|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Reflection Question and MDI questionprogram will log in a person and retrieve a list of all programs the person can use. When the shell program launches a program I use the following code: Dim extAssembly As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom("D:\testload\TestLoad\TestLoad\bin\Debug\testload.exe") Dim extForm As Form = extAssembly.CreateInstance("TestLoad.form1", True) Me.AddOwnedForm(extForm) extForm.MdiParent = Me extForm.Show() (Right now I hard coded the program in loadfrom and the form name in my program the program name and form name will be retrieved from a dataset). Each called program will have a class that will contain all the properties I need to set before it is run (I pass over the userID that logged in, the UserType like admin or poweruser, and anther piece of infomation regarding certification.) If my module contains the following code: Module Login Private strUserID As String Private strUserType As String Private strCertification As String Public Property UserID() As String Get UserID = strUserID End Get Set(ByVal value As String) strUserID = value End Set End Property Public Property UserType() As String Get UserType = strUserType End Get Set(ByVal value As String) strUserType = value End Set End Property Public Property Certification() As String Get Certification = strCertification End Get Set(ByVal value As String) strCertification = value End Set End Property End Module how do I set these properties in my loaded programs. This is imperative that I pass this data so the called program can act like the user logged in this program. I want to load these programs in an MDI form. I can do this (as the code above shows), however, my MDI form needs to have a tree view on the left that contains a list of all programs they can use. In the right pane I want to load the program. In addition, I would like an option to hide the treeview if needed and expand the child window to fill the whole container. Also, I do not want the user to launch more than one instance of each program. If they click the program and it is loaded, I just want to show the loaded child window. How can I create an MDI interface that will dock a treeview on the left of the form and display the program on the right. I tried using a split container but cannot find code to load a form into a split container. How can I detect a loaded child window. Thanks. John Wright are you looking to load these child Forms I.e as application as executables
?? do you know the source for them or just the executables? VJ Show quoteHide quote "John Wright" <riley_wri***@notmail.com> wrote in message news:OHNkH9zVGHA.1688@TK2MSFTNGP11.phx.gbl... > How can I set the property of a loaded Assembly using reflection. My > Shell program will log in a person and retrieve a list of all programs the > person can use. When the shell program launches a program I use the > following code: > > Dim extAssembly As System.Reflection.Assembly = > System.Reflection.Assembly.LoadFrom("D:\testload\TestLoad\TestLoad\bin\Debug\testload.exe") > > Dim extForm As Form = extAssembly.CreateInstance("TestLoad.form1", True) > > Me.AddOwnedForm(extForm) > > extForm.MdiParent = Me > > extForm.Show() > > (Right now I hard coded the program in loadfrom and the form name in my > program the program name and form name will be retrieved from a dataset). > Each called program will have a class that will contain all the properties > I need to set before it is run (I pass over the userID that logged in, the > UserType like admin or poweruser, and anther piece of infomation regarding > certification.) If my module contains the following code: > > Module Login > > Private strUserID As String > > Private strUserType As String > > Private strCertification As String > > Public Property UserID() As String > > Get > > UserID = strUserID > > End Get > > Set(ByVal value As String) > > strUserID = value > > End Set > > End Property > > Public Property UserType() As String > > Get > > UserType = strUserType > > End Get > > Set(ByVal value As String) > > strUserType = value > > End Set > > End Property > > Public Property Certification() As String > > Get > > Certification = strCertification > > End Get > > Set(ByVal value As String) > > strCertification = value > > End Set > > End Property > > End Module > > how do I set these properties in my loaded programs. This is imperative > that I pass this data so the called program can act like the user logged > in this program. > > I want to load these programs in an MDI form. I can do this (as the code > above shows), however, my MDI form needs to have a tree view on the left > that contains a list of all programs they can use. In the right pane I > want to load the program. In addition, I would like an option to hide the > treeview if needed and expand the child window to fill the whole > container. Also, I do not want the user to launch more than one instance > of each program. If they click the program and it is loaded, I just want > to show the loaded child window. How can I create an MDI interface that > will dock a treeview on the left of the form and display the program on > the right. I tried using a split container but cannot find code to load a > form into a split container. How can I detect a loaded child window. > Thanks. > > John Wright > > These are executables and I know the source. We will be creating all the exe
files from a base form. All programs will have the same Module with the same three variables as well. John Show quoteHide quote "Vijay" <vi***@msdiscussions.com> wrote in message news:e8Y8LO3VGHA.4360@TK2MSFTNGP14.phx.gbl... > are you looking to load these child Forms I.e as application as > executables ?? do you know the source for them or just the executables? > > VJ > > "John Wright" <riley_wri***@notmail.com> wrote in message > news:OHNkH9zVGHA.1688@TK2MSFTNGP11.phx.gbl... >> How can I set the property of a loaded Assembly using reflection. My >> Shell program will log in a person and retrieve a list of all programs >> the person can use. When the shell program launches a program I use the >> following code: >> >> Dim extAssembly As System.Reflection.Assembly = >> System.Reflection.Assembly.LoadFrom("D:\testload\TestLoad\TestLoad\bin\Debug\testload.exe") >> >> Dim extForm As Form = extAssembly.CreateInstance("TestLoad.form1", True) >> >> Me.AddOwnedForm(extForm) >> >> extForm.MdiParent = Me >> >> extForm.Show() >> >> (Right now I hard coded the program in loadfrom and the form name in my >> program the program name and form name will be retrieved from a dataset). >> Each called program will have a class that will contain all the >> properties I need to set before it is run (I pass over the userID that >> logged in, the UserType like admin or poweruser, and anther piece of >> infomation regarding certification.) If my module contains the following >> code: >> >> Module Login >> >> Private strUserID As String >> >> Private strUserType As String >> >> Private strCertification As String >> >> Public Property UserID() As String >> >> Get >> >> UserID = strUserID >> >> End Get >> >> Set(ByVal value As String) >> >> strUserID = value >> >> End Set >> >> End Property >> >> Public Property UserType() As String >> >> Get >> >> UserType = strUserType >> >> End Get >> >> Set(ByVal value As String) >> >> strUserType = value >> >> End Set >> >> End Property >> >> Public Property Certification() As String >> >> Get >> >> Certification = strCertification >> >> End Get >> >> Set(ByVal value As String) >> >> strCertification = value >> >> End Set >> >> End Property >> >> End Module >> >> how do I set these properties in my loaded programs. This is imperative >> that I pass this data so the called program can act like the user logged >> in this program. >> >> I want to load these programs in an MDI form. I can do this (as the code >> above shows), however, my MDI form needs to have a tree view on the left >> that contains a list of all programs they can use. In the right pane I >> want to load the program. In addition, I would like an option to hide >> the treeview if needed and expand the child window to fill the whole >> container. Also, I do not want the user to launch more than one instance >> of each program. If they click the program and it is loaded, I just want >> to show the loaded child window. How can I create an MDI interface that >> will dock a treeview on the left of the form and display the program on >> the right. I tried using a split container but cannot find code to load >> a form into a split container. How can I detect a loaded child window. >> Thanks. >> >> John Wright >> >> > > Ok that given why are you compiling them as executables.. you can just make
them binaries.. and call the constructor to load each Form...., so would not have to worry about all this assembly thing, also will make it easier to set properties... Sorry did I missed something here? VJ Show quoteHide quote "John Wright" <riley_wri***@notmail.com> wrote in message news:eNOmKA$VGHA.5288@TK2MSFTNGP14.phx.gbl... > These are executables and I know the source. We will be creating all the > exe files from a base form. All programs will have the same Module with > the same three variables as well. > > John > "Vijay" <vi***@msdiscussions.com> wrote in message > news:e8Y8LO3VGHA.4360@TK2MSFTNGP14.phx.gbl... >> are you looking to load these child Forms I.e as application as >> executables ?? do you know the source for them or just the executables? >> >> VJ >> >> "John Wright" <riley_wri***@notmail.com> wrote in message >> news:OHNkH9zVGHA.1688@TK2MSFTNGP11.phx.gbl... >>> How can I set the property of a loaded Assembly using reflection. My >>> Shell program will log in a person and retrieve a list of all programs >>> the person can use. When the shell program launches a program I use the >>> following code: >>> >>> Dim extAssembly As System.Reflection.Assembly = >>> System.Reflection.Assembly.LoadFrom("D:\testload\TestLoad\TestLoad\bin\Debug\testload.exe") >>> >>> Dim extForm As Form = extAssembly.CreateInstance("TestLoad.form1", True) >>> >>> Me.AddOwnedForm(extForm) >>> >>> extForm.MdiParent = Me >>> >>> extForm.Show() >>> >>> (Right now I hard coded the program in loadfrom and the form name in my >>> program the program name and form name will be retrieved from a >>> dataset). Each called program will have a class that will contain all >>> the properties I need to set before it is run (I pass over the userID >>> that logged in, the UserType like admin or poweruser, and anther piece >>> of infomation regarding certification.) If my module contains the >>> following code: >>> >>> Module Login >>> >>> Private strUserID As String >>> >>> Private strUserType As String >>> >>> Private strCertification As String >>> >>> Public Property UserID() As String >>> >>> Get >>> >>> UserID = strUserID >>> >>> End Get >>> >>> Set(ByVal value As String) >>> >>> strUserID = value >>> >>> End Set >>> >>> End Property >>> >>> Public Property UserType() As String >>> >>> Get >>> >>> UserType = strUserType >>> >>> End Get >>> >>> Set(ByVal value As String) >>> >>> strUserType = value >>> >>> End Set >>> >>> End Property >>> >>> Public Property Certification() As String >>> >>> Get >>> >>> Certification = strCertification >>> >>> End Get >>> >>> Set(ByVal value As String) >>> >>> strCertification = value >>> >>> End Set >>> >>> End Property >>> >>> End Module >>> >>> how do I set these properties in my loaded programs. This is imperative >>> that I pass this data so the called program can act like the user logged >>> in this program. >>> >>> I want to load these programs in an MDI form. I can do this (as the >>> code above shows), however, my MDI form needs to have a tree view on the >>> left that contains a list of all programs they can use. In the right >>> pane I want to load the program. In addition, I would like an option to >>> hide the treeview if needed and expand the child window to fill the >>> whole container. Also, I do not want the user to launch more than one >>> instance of each program. If they click the program and it is loaded, I >>> just want to show the loaded child window. How can I create an MDI >>> interface that will dock a treeview on the left of the form and display >>> the program on the right. I tried using a split container but cannot >>> find code to load a form into a split container. How can I detect a >>> loaded child window. Thanks. >>> >>> John Wright >>> >>> >> >> > >
How do you use an unbound DataAdapter?
Dummy question Getting the selected item from a listview Easy One: Bind a Text Box to a an Integer Variable WMI script to get Win32_Product Where to do the Loading tasks for application ? Getting DataGrid row X, Y position and Changing Column Width (2003) Can't get rid of references Using PLink interactively as a Telnet process with VB.Net 2003 Generate a text/binary file during installation |
|||||||||||||||||||||||