Reflection Question and MDI question



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


.



Relevant Pages

  • Re: Reflection Question and MDI question
    ... Ok that given why are you compiling them as executables.. ... Private strUserID As String ... Private strUserType As String ... I want to load these programs in an MDI form. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Reflection Question and MDI question
    ... are you looking to load these child Forms I.e as application as executables ... Private strUserID As String ... Private strUserType As String ... I want to load these programs in an MDI form. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Reflection Question and MDI question
    ... These are executables and I know the source. ... Private strUserID As String ... Private strUserType As String ... How can I detect a loaded child window. ...
    (microsoft.public.dotnet.languages.vb)
  • Relection and MDI
    ... program will log in a person and retrieve a list of all programs the person ... When the shell program launches a program I use the following ... Private strUserID As String ... Private strUserType As String ...
    (microsoft.public.dotnet.general)
  • Memorial Day report
    ... the pieces I'd fused with my bare match used a double string (parallel ... My film cannister shell was a test of my first use of homemade piped ... One of the stars distinctly changed from ... I get a good fire seal and fit to the mortar without noticeably ...
    (rec.pyrotechnics)