Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Urgent Problem in VB.net Re: Forms (http://www.go4expert.com/forums/urgent-vbnet-forms-t15728/)

hanleyhansen 6Jan2009 08:18

Urgent Problem in VB.net Re: Forms
 
I have a huge problem in VB.net.

This is my code:

Code:


Public
Class Form1
Public score AsInteger = 0
Public timercount AsInteger = 10
PrivateSub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Close()
EndSub
PrivateSub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
AboutBox1.Show()
EndSub
PrivateSub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Timer1.Enabled =
False
timercount = 10
TextBox2.Text = timercount.ToString()
EndSub
PrivateSub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
TextBox2.Text = timercount.ToString()
DoWhile Timer1.Enabled = TrueAnd TextBox2.Text <> "Correct!"
If Form3.Visible Then
TextBox2.Text = "Correct!"
ElseIf timercount = 0 Then
Timer1.Enabled = False
TextBox2.Text = "Done"
Else
timercount -= 1
EndIf
ExitDo
Loop
EndSub
PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
EndSub
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled =
True
Plot1.Show()
EndSub
PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled =
True
EndSub
PrivateSub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Timer1.Enabled =
True
EndSub
PrivateSub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
TextBox1.Text =
""
EndSub
PrivateSub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Plot2.Show()
EndSub
PrivateSub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Plot3.Show()
EndSub
End
Class

The problem seems to be in ths part of the code:

Code:

PrivateSub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Plot2.Show()
EndSub
PrivateSub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Plot3.Show()
EndSub

Everything looks fine but when I compile these to forms don't come up. The buttons jsut seems inactive or without any code written. The same exact code works to call up a different form but all the forms I made after that have the same problem and won't get called when the button is clicked.

Here is my code for calling the last working form:

Code:

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled =
True
Plot1.Show()
EndSub

Please help me with this issue because this is for a project that is due tomorrow 01/06/09!!

Thank you!!

hanleyhansen 6Jan2009 09:13

Re: Urgent Problem in VB.net Re: Forms
 
Nevermind guys. Problem solved!!


All times are GMT +5.5. The time now is 16:19.