Import a form into a solution via vb.net code.

  • Thread starter Thread starter Brandon Johnson
  • Start date Start date
B

Brandon Johnson

Is there anyway to import a form into a project using vb.net code?
So as an example, if i create a form on a separate project and I copy
the 3 files that it creates per object to the same folder as the
project that i want it to be imported to. I want to be able to run
code that checks that folder to see if there are any new objects to
import. Is there a way?
 
Is there anyway to import a form into a project using vb.net code?
So as an example, if i create a form on a separate project and I copy
the 3 files that it creates per object to the same folder as the
project that i want it to be imported to. I want to be able to run
code that checks that folder to see if there are any new objects to
import. Is there a way?

Do you mean in the ide? If you do, then I'm sure that there is a way
using the vs extensiblity model. I can't tell you exactly how - since
I haven't done any plugins for a long, long time - but hopefully, you
can read the extensibilty docs and figure it out.

If you mean at runtime in your application, then you are going to have
to compile them into a class library and write code to dynamically
load them. This is actually tricky to get right if you want to
actually isolate them in there own app domain (to protect your main
process). Anyway, I can point you at more details if this is what you
mean.

Tom Shelton
 
Do you mean in the ide? If you do, then I'm sure that there is a way
using the vs extensiblity model. I can't tell you exactly how - since
I haven't done any plugins for a long, long time - but hopefully, you
can read the extensibilty docs and figure it out.

If you mean at runtime in your application, then you are going to have
to compile them into a class library and write code to dynamically
load them. This is actually tricky to get right if you want to
actually isolate them in there own app domain (to protect your main
process). Anyway, I can point you at more details if this is what you
mean.

Tom Shelton

Yes this is exactly what im looking for. Ya i idealy would just like
to make an app that accepts new forms if there are new forms to be
imported into the compiled exe(if thats possible). I guess more or
less i need to know how to make an exe updatable without overwriting
it. Thanks so much for your help.
 
Back
Top