forked from syntax53/Nightmare-Redux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmHelpMonsters.frm
161 lines (139 loc) · 4.38 KB
/
frmHelpMonsters.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
VERSION 5.00
Begin VB.Form frmHelpMonsters
Caption = "Monsters Help"
ClientHeight = 7905
ClientLeft = 60
ClientTop = 345
ClientWidth = 7440
Icon = "frmHelpMonsters.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 7905
ScaleWidth = 7440
Begin VB.CommandButton cmdGI2
Caption = "Group/Index p2"
Height = 255
Left = 1680
TabIndex = 1
Top = 60
Width = 1635
End
Begin VB.CommandButton cmdBL
Caption = "Boss/NPC List"
Height = 255
Left = 3480
TabIndex = 2
Top = 60
Width = 1695
End
Begin VB.CommandButton cmdGI1
Caption = "Group/Index p1"
Height = 255
Left = 60
TabIndex = 0
Top = 60
Width = 1635
End
Begin VB.TextBox txtGI1
Height = 7575
Left = 0
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 4
Text = "frmHelpMonsters.frx":08CA
Top = 360
Width = 7455
End
Begin VB.TextBox txtBL
Height = 7575
Left = 0
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 5
Text = "frmHelpMonsters.frx":54B5
Top = 360
Visible = 0 'False
Width = 7455
End
Begin VB.TextBox txtGI2
Height = 7575
Left = 0
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 3
Text = "frmHelpMonsters.frx":9845
Top = 360
Visible = 0 'False
Width = 7455
End
End
Attribute VB_Name = "frmHelpMonsters"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Base 0
Option Explicit
Private Sub cmdBL_Click()
txtBL.Visible = True
txtGI1.Visible = False
txtGI2.Visible = False
End Sub
Private Sub cmdGI1_Click()
txtGI1.Visible = True
txtGI2.Visible = False
txtBL.Visible = False
End Sub
Private Sub cmdGI2_Click()
txtGI2.Visible = True
txtGI1.Visible = False
txtBL.Visible = False
End Sub
Private Sub Form_Load()
On Error Resume Next
Me.Top = ReadINI("Windows", "HelpMonstersTop")
Me.Left = ReadINI("Windows", "HelpMonstersLeft")
Me.Width = ReadINI("Windows", "HelpMonstersWidth")
Me.Height = ReadINI("Windows", "HelpMonstersHeight")
Me.Show
Me.SetFocus
If ReadINI("Windows", "HelpMonstersMaxed") = "1" Then Me.WindowState = vbMaximized
End Sub
Private Sub Form_Resize()
Dim lUseWidth As Long
Dim lUseHeight As Long
Const MINWIDTH As Long = 3000
Const MINHEIGHT As Long = 3000
'Copy the current width and height to our variables
lUseWidth = Me.Width
lUseHeight = Me.Height
'Set a minimum limit on the lUseWidth and lUseHeight variables
If lUseWidth < MINWIDTH Then lUseWidth = MINWIDTH
If lUseHeight < MINHEIGHT Then lUseHeight = MINHEIGHT
'Set the size of the textbox using the values in lUseWidth and lUseHeight
With txtGI1
.Move .Left, .Top, lUseWidth - 125, lUseHeight - TITLEBAR_OFFSET - 760
End With
With txtGI2
.Move .Left, .Top, lUseWidth - 125, lUseHeight - TITLEBAR_OFFSET - 760
End With
With txtBL
.Move .Left, .Top, lUseWidth - 125, lUseHeight - TITLEBAR_OFFSET - 760
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Me.WindowState = vbMinimized Then Exit Sub
If Me.WindowState = vbMaximized Then
Call WriteINI("Windows", "HelpMonstersMaxed", 1)
Else
Call WriteINI("Windows", "HelpMonstersMaxed", 0)
Call WriteINI("Windows", "HelpMonstersTop", frmHelpMonsters.Top)
Call WriteINI("Windows", "HelpMonstersLeft", frmHelpMonsters.Left)
Call WriteINI("Windows", "HelpMonstersHeight", frmHelpMonsters.Height)
Call WriteINI("Windows", "HelpMonstersWidth", frmHelpMonsters.Width)
End If
End Sub