Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 dosen't work :(

 

Help?!?

 

Phylum

Posted

It's very easy with .NET.

 

[*]Build your DLL using the /t:library command-line switch.

[*]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 you're interested.

[*]Build your EXE using the /r:MyDll.dll command-line switch.

[/list=1]

 

Voilà!

 

(I don't know what magic you must perform in order to do this via your IDEs.)

Posted

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 DLL's form. I want to prevent this?!?

Posted
There's only one instance of the DLL. You'll have to solve this problem in code, either or the client side or on the server side. (I can't really say which would be best without further details.)
  • *Experts*
Posted
If the user goes back to the original form and clicks the button again, they open up a new instance of the DLL's 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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...