By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,285 Members | 2,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,285 IT Pros & Developers. It's quick & easy.

in VB.net app how to show a modeless form when a model form show.

P: n/a
yzi
I have a list form and a detail form .

Before, I open the List form, use form.showDialog(),then I click List Item
and open the Detail Form by form.show().

now , user need when the list form show, auto open the first Item Detail .

I add detail form.show() in list form.form_load event , but problem.

some idea?? help me

Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
yzi,

Can you show a piece of code there are thousands of possibilities to show
forms

Cor

"yzi" <yz*@discussions.microsoft.com>
....
I have a list form and a detail form .

Before, I open the List form, use form.showDialog(),then I click List Item
and open the Detail Form by form.show().

now , user need when the list form show, auto open the first Item Detail
.

I add detail form.show() in list form.form_load event , but problem.

some idea?? help me

Nov 21 '05 #2

P: n/a
yzi
like this
'' Module1.vb
.........
Public Sub main()

Dim frm As New Form1
frm.ShowDialog()
End Sub
.........

'' Form1.vb
..........
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim frm As New Form2
frm.Show()

End Sub
............

Form2.vb
...............
...............

I need Form1 and Form2 all working.

"Cor Ligthert" wrote:
yzi,

Can you show a piece of code there are thousands of possibilities to show
forms

Cor

"yzi" <yz*@discussions.microsoft.com>
....
I have a list form and a detail form .

Before, I open the List form, use form.showDialog(),then I click List Item
and open the Detail Form by form.show().

now , user need when the list form show, auto open the first Item Detail
.

I add detail form.show() in list form.form_load event , but problem.

some idea?? help me


Nov 21 '05 #3

P: n/a
Yzi,

When you delete this part

\\\\
'' Module1.vb
........
Public Sub main()

Dim frm As New Form1
frm.ShowDialog()
End Sub
........ ///
And set in the solution properties the startup back to form1.

Than they both are active,

And although I find it not the best way to go, you can to learn create in
form2

Public frm1 as form

And in form1 '' Form1.vb private frm2 as Form2 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
frm2 = New Form2
frm2.Frm1 = me frm2.Show()

End Sub
...........


You can than even communicatie between the two

In form1 is form2 than frm2
In form2 is form1 than frm1

I hope this helps?

Cor
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.