|
-
Jul 19th, 2004, 01:50 AM
#1
Thread Starter
New Member
Newbie-question opening forms
Hi
I'm a total newbie at vb.net, so don't shoot me for a stupid question :-)
We have a table that we use to create a menubar.
in that table, we place the caption of the menu-item, the action (for example, openform)
and a parameter (for example the form that needs to be opened)
(we use this structure a lot in older access and vb6-applications)
The problem in .net is : we can't seem to get hold of the forms !
so the thing is : I read the table, get a formname that i need to open, but i can't open it :-)
(and we don' want to hardcode the formnames)
I could open all the forms at startup and unhide them when i need them?
anyone any idea?
thanks in advance
greetz
Frank
-
Jul 19th, 2004, 04:34 AM
#2
Lively Member
Edit: sorry, i just tested that and it wont work,
-
Jul 19th, 2004, 06:28 AM
#3
Thread Starter
New Member
i think i found the solution :-)
Dim myType As Type = Type.GetType("WindowsApplication1.Form1")
Dim myForm As Object = System.Activator.CreateInstance(myType)
myType.GetMethod("Show").Invoke(myForm, Nothing)
thx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|