Windows Forms
Architecture
Visual FoxPro
SQL Server
Smart Device
Visual Basic
Microsoft ISV
Windows Vista
Visual C#
Visual C++
.NET Development
Game Technologies
Visual Studio
Windows Live
VS Team System
Software Development Network>> Windows Forms>> Change Windows
Change Windows
Hot Topic
Help regarding the Autos or Locals windows in the .net 2003
Stuck at the first code line of the terrarium...
Getting A List Of Installed True Type and Type 1 Fonts
Resetting GridView
Issue with Custom Cursors
Winforms Datagrid Vs DataRow BeginEdit
How to bind a DataGridViewComboBoxColumn to an object rather than a value!
DataSet Merge to automatically do AcceptChanges
how do I respond to events from a dynamically created control?
How to get the correct value for DataGrid.Select(index) after DataView.Sort
Windows Forms
Create a color text editior with number lines
Rich Text Box Problem in C#
MDI Woes
Tiling children in MDI Parent space
Clickonce deployment error trying to download
Open MDI child from another MDI child
Location advice for a Custom Collection Class
Changing data values before it binds to a label
ToolStrip size
VB2005 - Listview Column Sort
Change Windows
I have a project and on this project I do have 3 Froms.
1 form1
2 john
3 creation
I want to know that if I put a button on form1 how do I get it to go to a next form.
What and how must I do this
Thanks
Answer this question
Change Windows
Chris0144
you have to keep track of all the forms in your main form - this main form will open and close all child forms.
DialogResult result = john.ShowDialog();
if(result ==DialogResult.OK)
{
....
}
thats the routine
Ertan Köseler
You could also have each form linked in order and not have a "main" form, per say...
Start your app with a Sub Main():
Sub Main()
Dim f As New Form1
f.Show()
Application.Run()
End Sub
Then in the "Next" Button_Click event on Form1 you do:
Private Sub NextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextButton.Click
Dim f As New John
f.Show()
Me.Close()
End Sub
And the same in John for Creation:
Private Sub NextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextButton.Click
Dim f As New Creation
f.Show()
Me.Close()
End Sub
Creation then needs one more line in either a "Finish" button's click event or in the Form.Closing event:
Private Sub Creation_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Application.Exit()
End Sub
That would give you a "Next, Next, Finish" or "wizard" style structure.
Change Windows
Answer this question
Change Windows
Chris0144
DialogResult result = john.ShowDialog();
if(result ==DialogResult.OK)
{
....
}
thats the routine
Ertan Köseler
Start your app with a Sub Main():
Sub Main()
Dim f As New Form1
f.Show()
Application.Run()
End Sub
Then in the "Next" Button_Click event on Form1 you do:
Private Sub NextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextButton.Click
Dim f As New John
f.Show()
Me.Close()
End Sub
And the same in John for Creation:
Private Sub NextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextButton.Click
Dim f As New Creation
f.Show()
Me.Close()
End Sub
Creation then needs one more line in either a "Finish" button's click event or in the Form.Closing event:
Private Sub Creation_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Application.Exit()
End Sub
That would give you a "Next, Next, Finish" or "wizard" style structure.