R
Richard Kucia
I've run into some problems with ShowDialog. Try this:
Create 2 forms, Form1 and Form2.
In Form1:
* Add a MainMenu
* Add a Button named Button1; set its Text = "Form2.ShowDialog"
* Set MinimizeBox=False
* Include this code:
Dim F2 As Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
F2.ShowDialog()
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
F2 = New Form2
End Sub
In Form2:
* Add a MainMenu
* Add an ImageList; place any icon in the ImageList
* Add a Toolbar; set the ToolBar's ImageList to the one just added
* Add a ToolBarButton; set its ImageIndex to 0
When you run the application, the toolbar from Form2 shows up on ***Form1*** when Form1 is initially shown. After displaying Form2 once, the toolbar no longer appears on Form1.
Richard Kucia
Create 2 forms, Form1 and Form2.
In Form1:
* Add a MainMenu
* Add a Button named Button1; set its Text = "Form2.ShowDialog"
* Set MinimizeBox=False
* Include this code:
Dim F2 As Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
F2.ShowDialog()
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
F2 = New Form2
End Sub
In Form2:
* Add a MainMenu
* Add an ImageList; place any icon in the ImageList
* Add a Toolbar; set the ToolBar's ImageList to the one just added
* Add a ToolBarButton; set its ImageIndex to 0
When you run the application, the toolbar from Form2 shows up on ***Form1*** when Form1 is initially shown. After displaying Form2 once, the toolbar no longer appears on Form1.
Richard Kucia