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()
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top