rjnewdotnet
12-08-2004, 04:18 PM
I am having a problem with moving back and forth between messageboxes and the executable.
How can I use a basic Mainmenu item and then when a message box appears to ask the user if they want to continue, it goes back to the original form. As of right now, it just closes the form from view and lets it sit in memory.
code example:
Case code :
Case 4
For i = 0 To 4 Step 1
grpcolAvg(i) = 0
colAvg = 0
For y = 0 To 3 Step 1
colAvg = grpArray(y, i) + colAvg
colLength = y + 1
Next
grpcolAvg(i) = colAvg / colLength
Next
If MessageBox.Show("The Average of Column 1: " & grpcolAvg(0) & ControlChars.NewLine & "The Average of Column 2: " & grpcolAvg(1) _
& ControlChars.NewLine & "The Average of Column 3: " & grpcolAvg(2) & ControlChars.NewLine _
& "The Average of Column 4: " & grpcolAvg(3) & ControlChars.NewLine & "The Average of Column 5: " & grpcolAvg(4) & ControlChars.NewLine & ControlChars.NewLine & "Continue Application?", "Exit Application", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then
Exit Sub
Else
Me.Close()
End If
------------------------------------------------------------------------
Thanks in advance,
RJ :confused:
How can I use a basic Mainmenu item and then when a message box appears to ask the user if they want to continue, it goes back to the original form. As of right now, it just closes the form from view and lets it sit in memory.
code example:
Case code :
Case 4
For i = 0 To 4 Step 1
grpcolAvg(i) = 0
colAvg = 0
For y = 0 To 3 Step 1
colAvg = grpArray(y, i) + colAvg
colLength = y + 1
Next
grpcolAvg(i) = colAvg / colLength
Next
If MessageBox.Show("The Average of Column 1: " & grpcolAvg(0) & ControlChars.NewLine & "The Average of Column 2: " & grpcolAvg(1) _
& ControlChars.NewLine & "The Average of Column 3: " & grpcolAvg(2) & ControlChars.NewLine _
& "The Average of Column 4: " & grpcolAvg(3) & ControlChars.NewLine & "The Average of Column 5: " & grpcolAvg(4) & ControlChars.NewLine & ControlChars.NewLine & "Continue Application?", "Exit Application", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then
Exit Sub
Else
Me.Close()
End If
------------------------------------------------------------------------
Thanks in advance,
RJ :confused: