Sign in to follow this  
Mulligan

[.net] Should be a simple C# question....

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this