Open Form

  • Thread starter Thread starter Melike Muftuoglu
  • Start date Start date
M

Melike Muftuoglu

Is it possible to show a form by using its name property in VB.NET. I am
thinking about getting the name of the windows form from database and then
show the form. just like DoCmd.OpenForm "nameof form" in MSaccess..
Thanks in advance
chaplin
 
Melike Muftuoglu said:
Is it possible to show a form by using its name property in VB.NET. I am
thinking about getting the name of the windows form from database and then
show the form. just like DoCmd.OpenForm "nameof form" in MSaccess..

\\\
Imports System.Reflection
..
..
..
Dim frm As Form = _
DirectCast( _
Activator.CreateInstance( _
Type.GetType("MyApplication.SampleForm") _
), _
Form _
)
frm.Show()
///
 
Back
Top