silly Q...but i dont knw the answer !!!

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

Join Date: Feb 2005
Posts: 17
Reputation: shelly121 is an unknown quantity at this point 
Solved Threads: 0
shelly121 shelly121 is offline Offline
Newbie Poster

silly Q...but i dont knw the answer !!!

 
0
  #1
Mar 2nd, 2005
hey ppl, i know this is aa really daft Q, but i only started using vb.net this yr and im not that gud at it!

basically i wana know how to go from one form to another using a button, wud it just be sumthin as simple as:

Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click

btnSearch = frmSearch

endSub
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 65
Reputation: cpopham is an unknown quantity at this point 
Solved Threads: 0
cpopham cpopham is offline Offline
Junior Poster in Training

Re: silly Q...but i dont knw the answer !!!

 
0
  #2
Mar 14th, 2005
No, you will need to create an object variable for the form you wish to open.

Somthing like this under the button sub should work:

Dim objNewForm as New NewForm()
objNewForm.ShowDialog()

Chester
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 23
Reputation: Khishin is an unknown quantity at this point 
Solved Threads: 0
Khishin Khishin is offline Offline
Newbie Poster

Re: silly Q...but i dont knw the answer !!!

 
0
  #3
Mar 16th, 2005
Adding to what cpopham said, make a subroutine for one of your buttons like this:

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

objNewForm.ShowDialog()

End Sub

Also make sure you put Dim objNewForm as New Form somewhere near the top. It should be "as New Form" and not "as New NewForm()"

That's in my version at least.
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



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC