Re: Reflection Question and MDI question
- From: "Vijay" <vijay@xxxxxxxxxxxxxxxxx>
- Date: Tue, 4 Apr 2006 20:59:02 -0500
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
"John Wright" <riley_wright@xxxxxxxxxxx> wrote in message
news:eNOmKA$VGHA.5288@xxxxxxxxxxxxxxxxxxxxxxx
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" <vijay@xxxxxxxxxxxxxxxxx> wrote in message
news:e8Y8LO3VGHA.4360@xxxxxxxxxxxxxxxxxxxxxxx
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_wright@xxxxxxxxxxx> wrote in message
news:OHNkH9zVGHA.1688@xxxxxxxxxxxxxxxxxxxxxxx
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
.
- References:
- Reflection Question and MDI question
- From: John Wright
- Re: Reflection Question and MDI question
- From: Vijay
- Re: Reflection Question and MDI question
- From: John Wright
- Reflection Question and MDI question
- Prev by Date: Re: Domain search like setting file permissions
- Next by Date: Read sequential file using VB
- Previous by thread: Re: Reflection Question and MDI question
- Next by thread: Event Handling in DataGridView with DataSet Wizard
- Index(es):
Relevant Pages
|