I still experience problems with the reinstating of the Cards1.frm. I am not sure if it has to do with some code or if the problem has to do with content in the GameLogic module (a module to determine the order of the forms to appear).
This is some code from the GameLogic module:
Code:
Do While GameToken <> EndGame
Select Case GameToken
Case Startup
Info.Show
Case Ques1
GameToken = idle
PlaySound vbNullString, 0&, SND_PURGE
Unload Info
Set Info = Nothing
DoEvents
Q1.Show
Case R1Cards1Red
GameToken = idle
PlaySound vbNullString, 0&, SND_PURGE
Unload Q1
Set Q1 = Nothing
DoEvents
Cards1.Show
Case Ques2
GameToken = idle
PlaySound vbNullString, 0&, SND_PURGE
Unload Cards1
Set Cards1 = Nothing
DoEvents
Q2.Show
Case R1Cards2
GameToken = idle
PlaySound vbNullString, 0&, SND_PURGE
Unload Q2
Set Q2 = Nothing
DoEvents
Cards1.Show
Case idle
DoEvents
End Select
If Forms.Count = 1 Then GameToken = EndGame
DoEvents
In the Form_Unload section of the Q2.frm:
Code:
Private Sub Form_Unload(Cancel As Integer)
Cards1.Timer1.Enabled = False
playing = False
Set DSBuffer = Nothing
Unload Q2
End Sub
And the area where I click the GoToCards button control and it is supposed to direct me back to the cards form and continue the cards where the player left off:
Code:
Private Sub cmdGoToCards_Click()
Cards1.Show
Q2.Hide
End Sub
I have still to successfully get back to the Cards1.frm after Q2. Is it possible I may have to do another Cards form (like Cards2) and carry over the card values that are visible with the same card sequence using some sort of module?