By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,462 Members | 1,126 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,462 IT Pros & Developers. It's quick & easy.

Show a form

P: n/a
hi all.
how can i show form1 from form2?
form1.show ?
how?

Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Wed, 10 Nov 2004 04:00:05 -0800, "shachar"
<an*******@discussions.microsoft.com> wrote:
hi all.
how can i show form1 from form2?
form1.show ?
how?


Dim form1Instance As New Form1
form1Instance.Show

Hope this helps

Tom
Nov 21 '05 #2

P: n/a

"shachar" <an*******@discussions.microsoft.com> wrote in message
news:16****************************@phx.gbl...
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
Nov 21 '05 #3

P: n/a
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/de...tarwinform.asp

http://www.devcity.net/net/article.a...=multipleforms
--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
"shachar" <an*******@discussions.microsoft.com> wrote in message
news:16****************************@phx.gbl...
hi all.
how can i show form1 from form2?
form1.show ?
how?

Nov 21 '05 #4

P: n/a

'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

"shachar" <an*******@discussions.microsoft.com> wrote in message
news:16****************************@phx.gbl...
hi all.
how can i show form1 from form2?
form1.show ?
how?

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.