-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrmMenu.frm
92 lines (78 loc) · 2.31 KB
/
frmMenu.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
VERSION 5.00
Begin VB.Form frmMenu
BorderStyle = 3 'Fixed Dialog
ClientHeight = 3195
ClientLeft = 150
ClientTop = 435
ClientWidth = 4680
ControlBox = 0 'False
HelpContextID = 1
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.Menu mnuGuns
Caption = "&Guns"
Begin VB.Menu mnuHighScoreInShots
Caption = "&High score in shots fired"
End
Begin VB.Menu mnuSoundOff
Caption = "&Sound off"
End
Begin VB.Menu mnuLine
Caption = "-"
End
Begin VB.Menu mnuHelp
Caption = "&Help"
HelpContextID = 1
End
Begin VB.Menu mnuAbout
Caption = "&About Guns"
End
End
End
Attribute VB_Name = "frmMenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'To show a context menu you need an extra form with the menu to avoid a
'line around the main form (thanx Bill)
Private Sub mnuAbout_Click()
frmAbout.Show vbModal
End Sub
Private Sub mnuHelp_Click()
If Not frmHelp Is Nothing Then
Unload frmHelp
End If
frmHelp.Show
End Sub
Private Sub mnuHighScoreInShots_Click()
mnuHighScoreInShots.Checked = Not mnuHighScoreInShots.Checked
If mnuHighScoreInShots.Checked Then
SaveSetting REG_APP, REG_SETTINGS, "HighScoreInShots", 1
gblnShots = True
frmGuns.lblScore.Caption = "Shots fired:"
Else
SaveSetting REG_APP, REG_SETTINGS, "HighScoreInShots", 0
gblnShots = False
frmGuns.lblScore.Caption = "Elapsed time:"
End If
GetHighScore
frmGuns.lblHighScore.Caption = gstrHighScore
frmGuns.txtScore.Text = 0
GetSettings
End Sub
Private Sub mnuSoundOff_Click()
mnuSoundOff.Checked = Not mnuSoundOff.Checked
If mnuSoundOff.Checked Then
SaveSetting REG_APP, REG_SETTINGS, "Sound Off", 1
Else
SaveSetting REG_APP, REG_SETTINGS, "Sound Off", 0
End If
GetSettings
End Sub