Calling Objects

Phylum

Well-known member
Joined
Jun 20, 2003
Messages
105
Location
Canada
I have a form that wants to call another project (a class library to get a DLL). It then wants to execute that Project (DLL). How do I do this? I added a reference to the project and then tryed to define a variable of that type, but it dosent work :(

Help?!?

Phylum
 
Its very easy with .NET.

  1. Build your DLL using the /t:library command-line switch.
  2. In your application code, add any using directives for namespaces defined in that DLL, if you fancy, and use the classes and methods in which youre interested.
  3. Build your EXE using the /r:MyDll.dll command-line switch.
    [/list=1]

    Voil
 
How do I restrict the user to one instance of each DLL. For example:

I have a windows application form. On that form there is a button that calls the form of another DLL. If the user goes back to the original form and clicks the button again, they open up a new instance of the DLLs form. I want to prevent this?!?
 
Theres only one instance of the DLL. Youll have to solve this problem in code, either or the client side or on the server side. (I cant really say which would be best without further details.)
 
Originally posted by Phylum
If the user goes back to the original form and clicks the button again, they open up a new instance of the DLLs form. I want to prevent this?!?

Just declare a new instance of the form from the DLL on the top of your code once and keep calling form.Show() where you have to without createing new objects.
 

Similar threads

B
Replies
0
Views
376
Blue Baron
B
B
Replies
0
Views
205
BlackholeBrain
B
V
Replies
0
Views
264
Vergassivellaunus
V
A
Replies
0
Views
786
ananda vardhana
A
Back
Top