I have a menu that crashes every one in a while. I click on it and it works for 1 sec and then sometimes crashes. This is the menu. My question is what does "Sub Button_Click" do and how is it related to Sub Help_Click? I am not sure what to put there or even if it is nessasary. and what does Send.Tag do? and how is all this related to 'sender'? I'm a little fuzzy on this,
Thanks
Thanks
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Menu
Activity.AddMenuItem("Title Screen","Help") 'top left
Activity.AddMenuItem("Instructions","Help") 'top center
Activity.AddMenuItem("Return To Game","Help") 'top right
Activity.AddMenuItem("Zero Stats","Help") 'bottom left
Activity.AddMenuItem("Practice (On/Off)","Help") 'bottom center
Activity.AddMenuItem("Allow Cont' Bets? (Y/N)","Help") 'more 1
Activity.AddMenuItem("Allow Double/Triple? (Y/N)","Help") 'more 2
Activity.AddMenuItem("Allow Splitting Pairs? (Y/N)","Help") 'more 3
Activity.AddMenuItem("Sound Effects (On/Off)","Help") 'more 4
Activity.AddMenuItem("Rate and Comment","Help") 'more 5
Sub Help_Click
'---------------------------------------------
'Menu
Select Sender
Case "Title Screen"
'turn on panel
Panel1.Visible=True 'on
'turn off other panels
Panel3.Visible=False
Panel4.Visible=False
Panel71.Visible=False
Panel72.Visible=False
Panel73.Visible=False
Panel74.Visible=False
Panel75.Visible=False
Panel75B.Visible=False
Panel76.Visible=False
Panel77.Visible=False
Panel78.Visible=False
Panel79.Visible=False
Panel80.Visible=False
Case "Return To Game"
Panel1.Visible=False
Panel3.Visible=False
If DebugOn = True Then
Panel4.Visible=True
Else If DebugOn=False Then
Panel4.Visible=False
End If
Panel71.Visible=False
Panel72.Visible=False
Panel73.Visible=False
Panel74.Visible=False
Panel75.Visible=False
Panel75B.Visible=False
Panel76.Visible=False
Panel77.Visible=False
Panel78.Visible=False
Panel79.Visible=False
Panel80.Visible=False
Case "Zero Stats"
Zero 'Subroutine
Case "Instructions"
Instruct 'Subroutine
Case "Practice (On/Off)"
Bug 'Subroutine
Case "Allow Cont' Bets? (Y/N)"
ContBet ' Subroutine
Case "Allow Double/Triple? (Y/N)"
DDTD 'SUBROUTINE
Case "Allow Splitting Pairs? (Y/N)"
SplitThem'SUBROUTINE
Case "Sound Effects (On/Off)"
Sound'SUBROUTINE
Case "Rate and Comment"
RateComment 'SUBROUTINE
End Select
'-------------------------------------
End Sub
Sub Button_Click
'---------------------------------------------
'menu
Dim Send As Button
Send = Sender
Select Send.Tag
Case "1"
Case "2"
Case "3"
'
Case "4"
'
Case "5"
Case "6"
'
Case "7"
'
Case "8"
'
Case "9"
'
Case "10"
'
End Select
'-------------------------------------
End Sub