[.net] Should be a simple C# question....
If i want an event to occur directly after when a dialog box appears for the first time, what event to I have to respond to?
Also, how do I go about calling a managed C# dll function from a managed C# application? I have found zero resources on this topic, which seems very odd to me....
[Edited by - Mulligan on September 1, 2004 10:40:27 PM]
Well, for the first one, add a delegate to the Load event, and then have the delegate remove itself from the Load event.
For the second one: you add a reference to the dll to your application. From that point on you can reference to the classes in the dll. Don't forget about namespaces.
For the second one: you add a reference to the dll to your application. From that point on you can reference to the classes in the dll. Don't forget about namespaces.
Quote:If i want an event to occur directly after when a dialog box appears for the first time, what event to I have to respond to?
Don't think there is one, not that corresponds exactly to what you're after anyway. The Form.Activated event will be raised every time the form is activated (which will happen directly after it first appears, but that isn't the only time), or Form.Load will be raised before the first time the form is shown time.
Quote:Also, how do I go about calling a managed C# dll function from a managed C# application?
All you have to do is add a reference the DLL in your project, or on the command-line use the option /reference:somedll.dll. Then you just use whatever you want from the DLL, analogous to #including a .h file in C++ except that it's already compiled.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement