Click here to Skip to main content
15,915,094 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionShowing Splash Screen Pin
Kapil Thakur5-Dec-06 20:57
Kapil Thakur5-Dec-06 20:57 
AnswerRe: Showing Splash Screen Pin
Christian Graus5-Dec-06 22:11
protectorChristian Graus5-Dec-06 22:11 
AnswerRe: Showing Splash Screen Pin
momooomooomomo5-Dec-06 23:05
momooomooomomo5-Dec-06 23:05 
GeneralRe: Showing Splash Screen Pin
Kapil Thakur6-Dec-06 1:09
Kapil Thakur6-Dec-06 1:09 
AnswerRe: Showing Splash Screen Pin

MmM.net</

5-Dec-06 23:46

MmM.net</

5-Dec-06 23:46 
Questiondeveloping wordart Pin
reddykoti5-Dec-06 20:37
reddykoti5-Dec-06 20:37 
AnswerRe: developing wordart Pin
Christian Graus5-Dec-06 21:58
protectorChristian Graus5-Dec-06 21:58 
QuestionMultiple Forms - Help! Pin
Tretanya5-Dec-06 15:46
Tretanya5-Dec-06 15:46 
I am trying to get several forms to work together. I have all my forms added and as long as only my first form has references to other forms I don't get an error, but as soon as I make other forms reference each other, i get an error and it wont run at all. Here is the coding I have so far for the forms. (each form as a single project runs fine)

(game.vb)(also listed as my start object in my project properties)
Module game
Sub Main()
Dim form1 As New form1
Dim code As New code
Dim decode As New decode
Dim math As New math
Dim piglatin As New piglatin
form1.ShowDialog()
code.ShowDialog()
decode.ShowDialog()
math.ShowDialog()
piglatin.ShowDialog()
End Sub
End Module

(form1)(this is my starting form and does work as long as other forms dont have any form references)
Dim code As New code
Dim decode As New decode
Dim math As New math
Dim piglatin As New piglatin

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
code.Close()
decode.Close()
math.Close()
piglatin.Close()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If optCode.Checked = True Then
Me.Visible = False
code.Visible = True
decode.Visible = False
math.Visible = False
piglatin.Visible = False
ElseIf optDecode.Checked = True Then
Me.Visible = False
code.Visible = False
decode.Visible = True
math.Visible = False
piglatin.Visible = False
ElseIf optMath.Visible = True Then
Me.Visible = False
code.Visible = False
decode.Visible = False
math.Visible = True
piglatin.Visible = False
ElseIf optPiglatin.Visible = True Then
Me.Visible = False
code.Visible = False
decode.Visible = False
math.Visible = False
piglatin.Visible = True
End If
End Sub
End Class

(code)(this is the second form in my list, moment i had references to the first form, it all stops working)

(global varables)
Dim form1 As New form1
Dim decode As New decode
Dim math As New math
Dim piglatin As New piglatin

(this is my exit button)
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
form1.Close()
decode.Close()
math.Close()
piglatin.Close()
End Sub

(this is my back button which should return to the menu(form1))
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Me.Visible = False
form1.Visible = True
End Sub

This is all the code that I have that concerns any joining of forms. I seriously don't know what I am doing wrong on this. Frown | :(

oh, the error I am getting when I have the code uncommented on my form-code is:
An unhandled exception of type 'System.StackOverflowException' occurred in system.windows.forms.dll (this is on the messagebox that pops up.)
The highlighted text that appears is:

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New() (this is the highlighted line of code)

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

AnswerRe: Multiple Forms - Help! Pin
Christian Graus5-Dec-06 15:56
protectorChristian Graus5-Dec-06 15:56 
GeneralRe: Multiple Forms - Help! Pin
Tretanya5-Dec-06 16:00
Tretanya5-Dec-06 16:00 
GeneralRe: Multiple Forms - Help! Pin
Christian Graus5-Dec-06 16:07
protectorChristian Graus5-Dec-06 16:07 
Questiondd/mm/yyyy Pin
charleslau28555-Dec-06 15:05
charleslau28555-Dec-06 15:05 
AnswerRe: dd/mm/yyyy Pin
Christian Graus5-Dec-06 15:18
protectorChristian Graus5-Dec-06 15:18 
AnswerRe: dd/mm/yyyy Pin
Guffa5-Dec-06 16:52
Guffa5-Dec-06 16:52 
GeneralRe: dd/mm/yyyy Pin
Ravi kumar G6-Dec-06 0:06
Ravi kumar G6-Dec-06 0:06 
AnswerRe: dd/mm/yyyy [modified] Pin
Costica U6-Dec-06 2:49
Costica U6-Dec-06 2:49 
QuestionClearing Textbox Control Pin
momooomooomomo5-Dec-06 13:58
momooomooomomo5-Dec-06 13:58 
AnswerRe: Clearing Textbox Control Pin
MatrixCoder5-Dec-06 14:33
MatrixCoder5-Dec-06 14:33 
GeneralRe: Clearing Textbox Control Pin
momooomooomomo5-Dec-06 16:12
momooomooomomo5-Dec-06 16:12 
GeneralRe: Clearing Textbox Control Pin
MatrixCoder5-Dec-06 16:29
MatrixCoder5-Dec-06 16:29 
AnswerRe: Clearing Textbox Control Pin
Kapil Thakur5-Dec-06 20:44
Kapil Thakur5-Dec-06 20:44 
QuestionVB 2005 code to a row and/or its cell values as variables Pin
Karma312515-Dec-06 10:10
Karma312515-Dec-06 10:10 
QuestionForm Resizing When Changing Text Size Thru FontDialog Pin
doveofpeace5-Dec-06 9:28
doveofpeace5-Dec-06 9:28 
QuestionPrinting a report Pin
dptalt5-Dec-06 8:48
dptalt5-Dec-06 8:48 
Questiondataset setup Pin
gorenekli5-Dec-06 6:03
gorenekli5-Dec-06 6:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.