Urgent Problem in VB.net Re: Forms

hanleyhansen's Avatar, Join Date: Jan 2008
Pro contributor
I have a huge problem in VB.net.

This is my code:

Code:

PublicClass 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
EndClass
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!!

Last edited by hanleyhansen; 6Jan2009 at 08:19.. Reason: Typo
hanleyhansen's Avatar, Join Date: Jan 2008
Pro contributor
Nevermind guys. Problem solved!!