G
Guest
Hi all,
I'm working on a Q & A type program. Within every from is a question, and 2 to 8 possible answers that are radio buttons. click a radio button, it takes you to another question. I have 5 buttons in each form. The forms are inherited from the first form, that has no questiions or answers. It's just the form, and a quit button and start over button.
All the forms are basicly the same structure. I'm using the "close" method to close a previous window. Thought about using "finalise", not sure which one would be more effective. I left a sample of a form below. I have been running this program fine. But now, I probably have close to 75 forms. So when I run I get "An unhandled exception of type "System.Stackoverflow Exception" occured in QA.exe" I beleive stack overflows means I have too many pending method calls. I can't believe that I can't use this many windows. The program will end up with about 100 froms all together. Any suggestions to what the problem is, and is there a better way to manage my windows?
Public Class Form11b
Inherits Unity_Troubleshooter.BaseForm
Public myform11b As Form11b
Public myform12a As New Form12a
Public myform12b As New Form12b
Public myform2c As Form2C
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
If rbyes11b.Checked = True Then
Me.Close()
myform12a.Show()
ElseIf rb11bno.Checked Then
Me.Close()
myform12b.show()
End If
End Sub
Private Sub btnHelp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHelp.Click
Dim Help As String
Help = "Dummy, didn't put anything here yet!!!"
MsgBox(Help, MsgBoxStyle.Information)
End Sub
Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
myform2c.Show()
Me.Close()
End Sub
End Class
TIA
Rudy
I'm working on a Q & A type program. Within every from is a question, and 2 to 8 possible answers that are radio buttons. click a radio button, it takes you to another question. I have 5 buttons in each form. The forms are inherited from the first form, that has no questiions or answers. It's just the form, and a quit button and start over button.
All the forms are basicly the same structure. I'm using the "close" method to close a previous window. Thought about using "finalise", not sure which one would be more effective. I left a sample of a form below. I have been running this program fine. But now, I probably have close to 75 forms. So when I run I get "An unhandled exception of type "System.Stackoverflow Exception" occured in QA.exe" I beleive stack overflows means I have too many pending method calls. I can't believe that I can't use this many windows. The program will end up with about 100 froms all together. Any suggestions to what the problem is, and is there a better way to manage my windows?
Public Class Form11b
Inherits Unity_Troubleshooter.BaseForm
Public myform11b As Form11b
Public myform12a As New Form12a
Public myform12b As New Form12b
Public myform2c As Form2C
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
If rbyes11b.Checked = True Then
Me.Close()
myform12a.Show()
ElseIf rb11bno.Checked Then
Me.Close()
myform12b.show()
End If
End Sub
Private Sub btnHelp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHelp.Click
Dim Help As String
Help = "Dummy, didn't put anything here yet!!!"
MsgBox(Help, MsgBoxStyle.Information)
End Sub
Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
myform2c.Show()
Me.Close()
End Sub
End Class
TIA
Rudy