Form on top of Main form???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an in house application which uses 3 different version of the same
database. When application starts a form is displayed which allows user to
provide the path to the database. My problem is I want this form to open on
top of main form. At present the main form doesn’t appears until user press
OK or Cancel on the form where they provide the data path.

I have used Sub Main as startup object as follows

Sub main()
Dim frm As New frmMain
frm.ShowDialog()
End Sub


And called the other on Form Load event of main form as follow

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim frm As New frmSetDatabasePath
frm.ShowDialog(Me)

End Sub

How can I fix this.
 
Job,

When you forget your Sub Main

And let your MainForm be your startup page, than you can archieve what you
want by setting this at the end of your load event of that mainform

\\\
me.show
Dim frm As New frmMain
frm.ShowDialog()
///

Did you know by the way that the
microsoft.public.dotnet.languages.vb newsgroups belongs to the most active
devellopers ones

(Somebody using C# would never do it this way, simple because it is
impossible with C#)

I hope this helps?

Cor
 
1st you load the main form and then in the onload event of main form load
database path form and also make it modal or modeless as ur requirement

"Job Lot" ने लिखा:
 
Back
Top