How can I show a form?

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2004
Posts: 2
Reputation: vbpro is an unknown quantity at this point 
Solved Threads: 0
vbpro vbpro is offline Offline
Newbie Poster

How can I show a form?

 
0
  #1
Sep 28th, 2004
I've created a second form for my project.How can I show it?
I find it's different from the VB6.The form.show , visible = true ... are not working now.
How can I do this?
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 2
Reputation: Mr.Stupid is an unknown quantity at this point 
Solved Threads: 0
Mr.Stupid Mr.Stupid is offline Offline
Newbie Poster

Re: How can I show a form?

 
0
  #2
Oct 18th, 2004
Originally Posted by vbpro
I've created a second form for my project.How can I show it?
I find it's different from the VB6.The form.show , visible = true ... are not working now.
How can I do this?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim form2 As New Form2
form2.Show()

End Sub
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 1
Reputation: jayateertha_23 is an unknown quantity at this point 
Solved Threads: 0
jayateertha_23 jayateertha_23 is offline Offline
Newbie Poster

Re: How can I show a form?

 
0
  #3
Nov 15th, 2004
Originally Posted by vbpro
I've created a second form for my project.How can I show it?
I find it's different from the VB6.The form.show , visible = true ... are not working now.
How can I do this?

declare a object for the second form and using the object show the form
like this
on click of a button of first form add this code

dim obj as new sec()
obj.show()
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 4
Reputation: Gayan Wijeratne is an unknown quantity at this point 
Solved Threads: 0
Gayan Wijeratne Gayan Wijeratne is offline Offline
Newbie Poster

Re: How can I show a form?

 
0
  #4
Nov 27th, 2008
Originally Posted by vbpro View Post
I've created a second form for my project.How can I show it?
I find it's different from the VB6.The form.show , visible = true ... are not working now.
How can I do this?




' create a object of the form

dim obj as new Form1
obj.show()
()
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 22
Reputation: isaackhazi is an unknown quantity at this point 
Solved Threads: 0
isaackhazi isaackhazi is offline Offline
Newbie Poster

Re: How can I show a form?

 
0
  #5
Nov 27th, 2008
u dont even have to create an object of the form.
just form2.show() if your calling it from another form and
Me.show() if your calling itself.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 16
Reputation: K-Dave is an unknown quantity at this point 
Solved Threads: 1
K-Dave K-Dave is offline Offline
Newbie Poster

Re: How can I show a form?

 
0
  #6
Dec 5th, 2008
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show() 'This code call the second form to be displayed
Me.Hide() ' This code hides the first form when the second form is displayed.
End Sub
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: How can I show a form?

 
0
  #7
Dec 5th, 2008
If you use the Form2.Show() that the shutdown mode is set to "When last forme closes" otherwise your program will quit.
Wayne

It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,232
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 539
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is online now Online
Moderator

Re: How can I show a form?

 
0
  #8
Dec 5th, 2008
use .showdialog and then it will close when the caller is closed
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 16
Reputation: K-Dave is an unknown quantity at this point 
Solved Threads: 1
K-Dave K-Dave is offline Offline
Newbie Poster

Re: How can I show a form?

 
0
  #9
Dec 6th, 2008
Hi! Wayne The reply that i sent is working on my two forms. Remember the button1 is on the first form and that's where the code goes.

first form button 1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show() 'This code call the second form to be displayed
Me.Hide() ' This code hides the first form when the second form is displayed.
End Sub
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 2
Reputation: sumithakb is an unknown quantity at this point 
Solved Threads: 0
sumithakb sumithakb is offline Offline
Newbie Poster

Re: How can I show a form?

 
0
  #10
Dec 8th, 2008
Originally Posted by vbpro View Post
I've created a second form for my project.How can I show it?
I find it's different from the VB6.The form.show , visible = true ... are not working now.
How can I do this?
how to compile and run in VB.Net 2003
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC