What a lot of code! No, I certainly didn't expect it to be that hard. Thanks for the answer, though. Now I need to write some letters to MS to figure out why you need to go to such trouble to add an image to an MDI client
Mine said, "An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.asdf'", both in VS.NET 2002, 2003, and the command-line compiler csc.exe (which VS.NET uses).
I need same help if you could help me!I have to windows aplications one is the Client and the other is the server but i can't change information between them, now i'm using sockets, if sameone could help-me!:].
i don't know if is possibel this way, right now i don't know the right direction for my application, what i want is:
One server that receives a msg from a client application testBox into a label that is in the server
Object-based collections may be fine for reference types, but I'm looking for a high-performance collection to store only value types without the boxing/unboxing overhead. Is there anything available to me in the .Net BCL? Or anything on this site that might help me? (already did a search, but might've missed something)
Not in the BCL, not until .NET 2.0 when they will be introducing generics in .NET.
For now, you can implement something yourself. Almost all collection-like classes in .NET use an ArrayList because it can grow but it does take an Object which requires boxing value types. ArrayList uses arrays internally, and creates new arrays when necessary and copies elements to the new array. Do the same yourself, but using the value types that you need to collect. Methods like Array.CopyTo make copying elements to the new array easy, and of course creating a new array that's large enough isn't hard. For example, ArrayList.Capacity is the initial capacity (size of the array). When more elements need to be stored, Capacity is doubled and a new array of that size is created. Elements are copied and the old array is disposed (if necessary). You wouldn't have to double, though, it just what the BCL does. You could implement more predictive algorithms if you need to.
If you mean your entire application is not the active Window, then using a system hook is best.
If you mean that a dialog in your application has lot focus, but your application still has focus, then you should use an IMessageFilter and register it with Application.AddMessageFilter.
Using system hooks slows down the speed of the entire window manager because your program has to filter and process the necessary data. If you don't NEED to, don't do it.
Also, if you do use a system hook, make sure you unregister it before exiting your application, like in your main window's (i.e., the Form that was run with Application.Run) Close event handler, or better yet in the Dispose override, or before youe application's entry point (i.e., Main) exits.
Do not keep posting the same question - we do not like that here and if you didn't get answers the first 1000 times, you probably won't get one at all (but might find more spam in your inbox!)
What I gave you should work (the link that Mazdak sent you). If it doesn't, you need to reply to that thread and - as I stated in the message - research the problem instead of just guessing and asking other people!
Sorry. But I have research enough, and it is not in the .net help, it is, but it doesnt work. Your example and Mazdak'a didnt work also. Maybe you should try what you post. When I help someone in a problem, I tried to help them completly not half way. Thanks.
Carlos Eduardo Hernandez P.
Last Visit: 31-Dec-99 19:00 Last Update: 31-Jan-23 9:50