T Tom John Nov 10, 2004 #2 hi all. how can i show form1 from form2? form1.show ? how? Click to expand... Dim form1Instance As New Form1 form1Instance.Show Hope this helps Tom
hi all. how can i show form1 from form2? form1.show ? how? Click to expand... Dim form1Instance As New Form1 form1Instance.Show Hope this helps Tom
R Richard Myers Nov 10, 2004 #3 shachar said: hi all. how can i show form1 from form2? form1.show ? how? Click to expand... You can find this newsgroup and make a post to it and yet you cant find the answer to that? Dim frmOne as new Form1 frmOne.Show You practically answered your own question. Richard
shachar said: hi all. how can i show form1 from form2? form1.show ? how? Click to expand... You can find this newsgroup and make a post to it and yet you cant find the answer to that? Dim frmOne as new Form1 frmOne.Show You practically answered your own question. Richard
M Mike McIntyre Nov 10, 2004 #4 Shachar, It sounds like you may have already shown Form1, gone to Form2, and want to reshow Form1? If so you need to learn how to declare your form variables in a way that you can access them from anywhere (any form) in your application. Here are a couple of articles that explain how to do this. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/getstarwinform.asp http://www.devcity.net/net/article.aspx?alias=multipleforms -- Mike Mike McIntyre Visual Basic MVP www.getdotnetcode.com
Shachar, It sounds like you may have already shown Form1, gone to Form2, and want to reshow Form1? If so you need to learn how to declare your form variables in a way that you can access them from anywhere (any form) in your application. Here are a couple of articles that explain how to do this. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/getstarwinform.asp http://www.devcity.net/net/article.aspx?alias=multipleforms -- Mike Mike McIntyre Visual Basic MVP www.getdotnetcode.com
Y Yonas Hagos Nov 10, 2004 #5 'Say you got two forms Form1 and frmTransaction ' Define your global variables here on say form1. Variables which you want to use in both forms Dim UserName As String Dim PinNumber As String Dim Balance As Decimal ' when the OK button in say Form1 is clicked, the following piece of code will launch your second 'form Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click Dim frmTrans As New frmTransaction frmTrans.ShowDialog() End sub
'Say you got two forms Form1 and frmTransaction ' Define your global variables here on say form1. Variables which you want to use in both forms Dim UserName As String Dim PinNumber As String Dim Balance As Decimal ' when the OK button in say Form1 is clicked, the following piece of code will launch your second 'form Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click Dim frmTrans As New frmTransaction frmTrans.ShowDialog() End sub