|
Nigel H. Lin wrote:
I tried to fit those two MDI child forms vertically and each of them occupies half height of the range of MDI parent form; however scrollbars came out and destroy the outlook of my program
I have to disagree, scrollbars don't need to show because of that. Why don't you tile the MDI clients instead vertically or horizontally ? Get yourself the Scribble sample (MSDEV.NET CDs), I am pretty sure you'll like it.
|
|
|
|
|
Thank you for your reply again.
Here is the information related to this issue that I got from GotDotNet Community. You might want to know.
[Quote Begin]
Sorry to say but this is a bug in the 1.0 version of the framework. I 've already posted this same question in 3 different forums here on gotdotnet but no one could help or figure it out.
http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=20187&Page=1#20187
http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=20186&Page=1#20186
http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=20185&Page=1#20270
I finally used one of my support credits and called microsoft. It took them about 3 weeks to figure out that this was a bug in the framework. It has nothing to do with VB, C# or any other language. They said they would put the request in to fix this in the next release. I havent checked 1.1 to see if its fixed but that may solve your problem. If you're already using 1.1 then you might have to wait for the next release.
Cheers,
Reginald
Forum: C# Posted By: ReginaldHenderson
[Quote End]
******************************************************
Nigel H. Lin
Ph.D. Student
Department of Computer Science and Information Engineering
Tamkang University
Part Time Lecturer
Kuang Wu Institute of Technology and
St. John's & St. Mary's Institute of Technology
--------------------------------------------------------------------
Email Box : nigel@mail.topwise.com
******************************************************
|
|
|
|
|
Nigel H. Lin wrote:
figure out that this was a bug in the framework.
Yes, sort of.
|
|
|
|
|
what is the best way to save variables (login ID, etc) accross all forms without killing the PC memroy and application performance?
Jassim Rahma
|
|
|
|
|
jrahma wrote:
what is the best way to save variables (login ID, etc) accross all forms without killing the PC memroy and application performance?
Those things are unrelated to each other. Serializing one or more objects can be directed to flat files (see BinaryFormatter for instance), with no memory overhead.
Application performance ? Of course, if you are supposed to serialize 10000 object states 10 times each second, you are likely to have a couple issues, but isn't it up to you to write an appropriate application logic instead ? For instance, why the states of all objects should be saved if the last state has really changed for only a fraction of them.
|
|
|
|
|
I'm new to C#, and can't understand what's wrong here. I'm trying to create an array of objects, but I get this error:
"Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object."
at tht line "b[i] = new FirstClass();"
Can anyone tell me what I'm doing wrong?
Thanks in advance.
Len
public class FirstClass
{
public int a = 0;
public FirstClass()
{
}
}
public class SecondClass
{
public FirstClass[] b;
public SecondClass()
{
for (int i=0; i<16; i++)
{
b[i] = new FirstClass();
}
}
}
....
static void Main()
{
SecondClass c = new SecondClass();
....
|
|
|
|
|
The array itself must be created before you use it. For instance, b = new FirstClass[100];
If you want more dynamical array creation, just use System.Collections.ArrayList instead.
|
|
|
|
|
Okay I am seriously stumped....
There must be a way for a socket object to tell when it is done recieving a file... If we are just serializing a class and sending it between a client and a server and the object is 700 bytes.. How can I tell when the object is done sending...
I am sending this object over and over... So i need to know when it begins and when it ends.
Please help me out..
Please please please....
Thanks,
Steve Nelson.
|
|
|
|
|
Are you using synchronous or asynchronous sockets ?
If it's synchronous, then you just do .Send or .Receive, and when the call returns, that's because it's done! (or failed miserably by the way).
If it's asynchronous, you've got the IAsyncResult interface to subscribe for. More info here[^].
|
|
|
|
|
Thank you so much.. examples... oman!!
Was going insane seriously..
Thanks again a million times.
Sincerely,
Stephen.
|
|
|
|
|
You need to add some control protocol to the stream.
Very simple would be send a fixed number of bytes that contain the size of the object first, let the reciver read that, then read that number of bytes from the stream, then repeat. I do not suggest that you do something this simple in real life though, buu you get the picture?
Stephen.
|
|
|
|
|
im intresting in creating a chat programm using asyc transfer methods (no blocking... multiple clients can connect at the same time) can anyone point me in a good direction... im total newbie too net apps...so start easy.... ie dont throw me into the lions den.
thanks alot
jesse M.
|
|
|
|
|
I have seem plenty of these types of applications included with the freely downloadable source code with C# books. Have a look on wrox.com.
Who is this miscrosoft, and what devilish plans have they for us?
|
|
|
|
|
so ill work on one..and send you the souce...and then you comment with some improvments ?? if thats okay...(i got your email from when you wrote me earlyer..);
|
|
|
|
|
|
I have a method inside a class, method is called PopulateFiles()... it builds a string array of files in a given local directory and then adds the strings to a Treeview. The method works well using tha following statement:
string[] stringFiles = Directory.GetFiles(getFullPath(nodeCurrent.FullPath));
I needed to see if I could also get a similar listing for a network directory, so as a test, I copied the statement and put it below the first, like this:
string strPath = @"\\S4\msdn\";
string[] stringFilesNet = Directory.GetFiles(strPath));
So it's really just a duplicate of the first statement, except the variable name is different, and the GetFiles parameter is a quoted string instead of an inline call to another method. It all compiles and builds fine.
Problem is that when I attempt to do a quickwatch on stringFilesNet, it says "error:identifier 'stringFilesNet' out of scope"...
why would it be out of scope ?
|
|
|
|
|
vlusardi wrote:
Problem is that when I attempt to do a quickwatch on stringFilesNet, it says "error:identifier 'stringFilesNet' out of scope"...
Easily reproduced. It becomes out of scope as soon as you are paused on a breakpoint placed outside the braces enclosing the stringFilesNet variable.
|
|
|
|
|
I guess I'm wondering why the first statement would not be out of scope, then...??? I get valid values for the first statement, but an error on the second... I'm able to do quick watch on the first variable with no problems.
In fact, if I add both to my watch window, and then step past both statements in the debugger, the first variable is valid and the second says "out of scope"... I'm clueless... thanks for your input...
|
|
|
|
|
figured it out...
Reason it was outa scope is because it wasn’t being used elsewhere in the code… technically, it makes sense cuz if it’s not used anywhere other than on the line where the variable is assigned a value, it goes outa scope as soon as you leave that line… ok I’m over it… thanks again for the input
Vince
|
|
|
|
|
Hi,
Okay I am trying to serialize a class and throw it into a MemoryStream so that I can send it from my client to server.
ie..
MemoryStream ms = new MemoryStream(ByteBuffer,0,iRead);
BinaryFormatter b = new BinaryFormatter();
b.Serialize(ms, m_User);
My problem is I don't know how big my serialized class is going to be before I start, which means I don't have iRead.
Could someone help me out with this...
Thanks.
|
|
|
|
|
CodePuppet wrote:
MemoryStream ms = new MemoryStream(ByteBuffer,0,iRead);
You are using one of the non-resizable MemoryStream constructors. Why not use new MemoryStream() instead, and then adjust the capacity with a simple .SetLength() .
Serialization itself[^]. (the tutorial uses a FileStream, but that's not an issue since both FileStream and MemoryStream are IO.Stream derived classes).
|
|
|
|
|
Hi all,
This might be a very easy question and a commen topic and I know there is a lot of info on it but I could not find a single tutorial or artical for creating and using a dll in Dev-C++, I am using the latest version 5.0 beta 7 (4.9.7.0). I know there is a project template type dll to select and most of the code is ready but I can't understand it and there is nothing written in the help documents. And the worst part is there is nothing on how to use the compiled dll . The reason why I choose Dev-C++ for my dll is becouse I love it and it is so easy to use, except for this part maybe , and I have already written the program that the dll is for in Dev-C++. I heard on the site www.functionx.com/visualc/applications/staticdll.htm from FunctionX that dlls compiled in Visual C++ can't simply be "plugged" in programs written in Dev-C++ and Borland C++, is that true? And how do I use and create a dll in Dev-C++?
Aidman » over and out
|
|
|
|
|
|
Where else should I post this topic? Everything else seems to be related to Visual C++...
Aidman » over and out
|
|
|
|
|