473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Relection and MDI

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\T estLoad\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

Apr 3 '06 #1
0 911

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: nicke | last post by:
I'm running linux and would like to generate specific frequencies and play them(in OSS) or alternatively save them as wav files, how should I accomplish this? Using python to play and generate is...
2
by: frustrated | last post by:
Before I begin, I must first make the following disclaimer: Although I have considerable programming experience, I do not consider myself by any means to be an expert C++ programmer. The following...
5
by: ZhangZQ | last post by:
if there is a function in a win32 dll, it is definition is int add(int a, int b); how to define that function pointer in C#? thank you very much!
4
by: Tuvas | last post by:
Anyone know a module that does CRC16 for Python? I have an aplication that I need to run it, and am not having alot of sucess. I have a program in C that uses a CRC16 according to CCITT standards,...
7
by: sujit | last post by:
Hi All, I have query regarding "C++ and Reflection". I could not get sufficient information from net on this topic. Does C++ support reflection or any features similar to some other languages...
7
by: Tilted | last post by:
Hi I have the following scenario... public class aclass { private bclass mbclass public aclass() {
5
by: jg | last post by:
I followed the pattern in the MSDN dot net example for .net server and I tried a making simple .net dll as COM from Option Explicit On Option Strict On Imports System Imports...
4
by: jupitermoonbeam | last post by:
Hello, I wondered if anyone could help. I wish to retrieve the PropertyInfo of a specific interface but can't work out how to do this in a type safe way. Basically I don't want to do this:...
2
by: vjainpee | last post by:
I m new to c# please let me know what is reflection in c#,I m not able to get it from books i read please give some example to explain where it is useful Thanks in advance
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.