|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dynamically load a formIs it possible to dynamically load a form from file? This form is just
a .vb file and has not been added to the project during design time. Ken "kendu" <ken***@yahoo.com> wrote in news:1166478195.854118.192180 @l12g2000cwl.googlegroups.com:> Is it possible to dynamically load a form from file? This form is just Yes, you can use reflection (System.Reflection namespace) to dynamically > a .vb file and has not been added to the project during design time. load classes - either from an assembly (DLL) or from source code (from source code you'll need to dynamically compile the file too). Spam Catcher wrote:
> "kendu" <ken***@yahoo.com> wrote in news:1166478195.854118.192180 The idea is to generate forms at run-time then view them. Thanks, SC.> @l12g2000cwl.googlegroups.com: > > > Is it possible to dynamically load a form from file? This form is just > > a .vb file and has not been added to the project during design time. > > Yes, you can use reflection (System.Reflection namespace) to dynamically > load classes - either from an assembly (DLL) or from source code (from > source code you'll need to dynamically compile the file too). Wonder if there is any good code example? I know, it's getting kind of gritty :-) "kend9u" <vlong***@gmail.com> wrote in message Why not generate them using native code? Why write it to a file?news:1166509391.058379.206560@t46g2000cwa.googlegroups.com... > The idea is to generate forms at run-time then view them. Thanks, SC. > Wonder if there is any good code example? I know, it's getting kind of > gritty :-) Show quoteHide quote > Michael C wrote:
> "kend9u" <vlong***@gmail.com> wrote in message We're going to re-use the generated forms by adding them to other> news:1166509391.058379.206560@t46g2000cwa.googlegroups.com... > > The idea is to generate forms at run-time then view them. Thanks, SC. > > Wonder if there is any good code example? I know, it's getting kind of > > gritty :-) > > Why not generate them using native code? Why write it to a file? > > > projects, Michael. Got the source code for the forms generated and written to disk files already. The next step would be compiling and displaying these files at run-time. "Quick and dirty" ways to accomplish the tasks are much appreciated. Any wrapper to handle it out there? Ken "kendu" <ken***@yahoo.com> wrote in message This is not a good way to do what I think you're trying to achive (addin news:1166478195.854118.192180@l12g2000cwl.googlegroups.com... > Is it possible to dynamically load a form from file? This form is just > a .vb file and has not been added to the project during design time. sort of functionality). The form should be compiled into a dll and then the dll should be loaded. Show quoteHide quote > > Ken > "Michael C" <nospam@nospam.com> wrote in Yes, I agree, that is the better way.news:OucgtZwIHHA.4712@TK2MSFTNGP04.phx.gbl: > This is not a good way to do what I think you're trying to achive > (addin sort of functionality). The form should be compiled into a dll > and then the dll should be loaded. Another possiblity is to use the VS.NET designer component to serialize a generated form. The form can then be easily reloaded or transferred to another app. Michael C wrote:
> "kendu" <ken***@yahoo.com> wrote in message Hi Michael,> news:1166478195.854118.192180@l12g2000cwl.googlegroups.com... > > Is it possible to dynamically load a form from file? This form is just > > a .vb file and has not been added to the project during design time. > > This is not a good way to do what I think you're trying to achive (addin > sort of functionality). The form should be compiled into a dll and then the > dll should be loaded. > > > > > Ken > > I just came across a post that is in line with what you mention about compiling a form into a DLL. Could you take a look: http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/b4d63b587a21498a/8940f38359604965?lnk=gst&q=kendu&rnum=1&hl=en#8940f38359604965
business layer, data access layer , presentation layer for asp.net using C#.net
Convert OEM to Unicode class types in vb.net What is the return type of Session("Something")? Raising an event from a user control Inherited form Name from Base How to manage a exception in a Aplications Questions, questions...... Cleaning up Excel After using Excel Interop How do I find the computer name on which my program is running? |
|||||||||||||||||||||||