Groups | Blog | Home
all groups > dotnet general > december 2004 >

dotnet general : Form on top of Main form???


Job Lot
12/21/2004 9:37:02 PM
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.
AmitSeth
12/22/2004 2:11:01 AM
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" ने लिखा:

[quoted text, click to view]
Cor Ligthert
12/22/2004 9:53:22 AM
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


"Job Lot" <JobLot@discussions.microsoft.com>

[quoted text, click to view]

AddThis Social Bookmark Button