Phylum Posted July 12, 2003 Posted July 12, 2003 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 Quote
_SBradley_ Posted July 12, 2003 Posted July 12, 2003 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.) Quote
Phylum Posted July 12, 2003 Author Posted July 12, 2003 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?!? Quote
_SBradley_ Posted July 12, 2003 Posted July 12, 2003 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.) Quote
*Experts* mutant Posted July 12, 2003 *Experts* Posted July 12, 2003 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. Quote
Phylum Posted July 12, 2003 Author Posted July 12, 2003 Thanks to all of you. Everything works exactly how I want it now :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.