Show a form

  • Thread starter Thread starter shachar
  • Start date Start date
shachar said:
hi all.
how can i show form1 from form2?
form1.show ?
how?

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,

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
 
'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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top