| | |
How do you switch between forms in vb.net?
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2004
Posts: 1
Reputation:
Solved Threads: 0
I am learing vb.net currently on my own and I have two questions.
1. How do you switch between forms via a button command?
2. I have .net student version and I would like to know how to package a .exe for a computer without .net installed.
These are driving me crazy - I can do it in VB6 but I am lost here.
Thank you for any help,
Greg
1. How do you switch between forms via a button command?
2. I have .net student version and I would like to know how to package a .exe for a computer without .net installed.
These are driving me crazy - I can do it in VB6 but I am lost here.
Thank you for any help,
Greg
•
•
Join Date: Dec 2004
Posts: 1
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by MasterNovice
I am learing vb.net currently on my own and I have two questions.
1. How do you switch between forms via a button command?
2. I have .net student version and I would like to know how to package a .exe for a computer without .net installed.
These are driving me crazy - I can do it in VB6 but I am lost here.
Thank you for any help,
Greg
VB.NET Syntax (Toggle Plain Text)
form2.Show form1.Hide
?? Not exactly sure ... I did something like that in middle school though!
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
•
•
Join Date: Jul 2007
Posts: 2
Reputation:
Solved Threads: 0
Do something like this on the on click event of the command button
You can use a case statement also but I do recommend using the form.displaydialog as opposed to form.show that way you can't move back to the parent form until the opened one is closed. You can also hide the parent form by adding in form.hide.
VB.NET Syntax (Toggle Plain Text)
IF radiobutton1.checked = True OR radiobutton2.checked = True THEN form2.displaydialog ELSE form3.displaydialog
You can use a case statement also but I do recommend using the form.displaydialog as opposed to form.show that way you can't move back to the parent form until the opened one is closed. You can also hide the parent form by adding in form.hide.
Last edited by Seamus0291; Jul 26th, 2007 at 8:50 pm. Reason: BB code not set.
Hi,
write this code in Command Click event:
Regards
Veena
write this code in Command Click event:
If RadioButton1.Checked = True Or RadioButton2.Checked=True Then Form1.Show Else Form2.Show End if
Regards
Veena
Last edited by QVeen72; Jul 29th, 2007 at 8:53 am.
Hi,
Every time u Build and run ur project, An "Exe" file is created in The "Bin" folder of the application path, u can use this Exe to re-distribute.
To Create Set-up Package Check This
In Client machine u have to install "Runtime .Net Framework", And Run The Set-Up Created above.
Regards
Veena
Every time u Build and run ur project, An "Exe" file is created in The "Bin" folder of the application path, u can use this Exe to re-distribute.
To Create Set-up Package Check This
In Client machine u have to install "Runtime .Net Framework", And Run The Set-Up Created above.
Regards
Veena
•
•
Join Date: Aug 2007
Posts: 2
Reputation:
Solved Threads: 0
I have similar problem .
Ihave 2 forms , iwant to enter variables on form1 and show them in form2
This what i have soo far
form1
=====
Private Sub Button1_Click(val blala)
Fnamesender = TextBox2.Text
Me.Hide()
Form2.Show()
End Sub
form2
=====
Private Sub Form2_Load(ByVal blabla bla)
Label.text = Fnamesender
end sub
i have a mudule
===========
Module one
Public Fnamesender As String
end module
The Problem is when i enter a text in TextBox2 in form1 and view it in Label its ok , but if you go back to form1 and enter a name in textBox2 it doesnt change in label . how can i clear label.text
Ihave 2 forms , iwant to enter variables on form1 and show them in form2
This what i have soo far
form1
=====
Private Sub Button1_Click(val blala)
Fnamesender = TextBox2.Text
Me.Hide()
Form2.Show()
End Sub
form2
=====
Private Sub Form2_Load(ByVal blabla bla)
Label.text = Fnamesender
end sub
i have a mudule
===========
Module one
Public Fnamesender As String
end module
The Problem is when i enter a text in TextBox2 in form1 and view it in Label its ok , but if you go back to form1 and enter a name in textBox2 it doesnt change in label . how can i clear label.text
![]() |
Similar Threads
Other Threads in the VB.NET Forum
- Previous Thread: Difference between typed dataset and untyped dataset..?
- Next Thread: Help with appending text file
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access add arithmetic array assignment basic binary bing box button buttons c# center code combobox component connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net excel file-dialog firewall folder google hardcopy image images isnumericfuntioncall listview login math memory mobile ms mssqlbackend mysql navigate net networking opacity output pan peertopeervideostreaming picturebox picturebox1 plugin port print printing printpreview problemwithinstallation project record reports" reuse save savedialog serial server sorting sql storedprocedure string temp text textbox timer toolbox updown upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet view visual visualbasic visualbasic.net visualstudio web wpf






