-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathVPinMAMETest.frm
877 lines (810 loc) · 24.4 KB
/
VPinMAMETest.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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
VERSION 5.00
Begin VB.Form VPinMAMETest
BorderStyle = 1 'Fixed Single
Caption = "VPinMame Test"
ClientHeight = 8475
ClientLeft = 45
ClientTop = 330
ClientWidth = 5640
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 8475
ScaleWidth = 5640
Begin VB.CommandButton Command1
Caption = "Clear"
Height = 375
Left = 120
TabIndex = 58
Top = 2160
Width = 555
End
Begin VB.TextBox GName
Height = 285
Left = 1320
TabIndex = 56
Top = 7440
Width = 1815
End
Begin VB.TextBox GValue
Height = 285
Left = 3240
TabIndex = 55
Top = 7440
Width = 1335
End
Begin VB.CommandButton GPut
Caption = "P"
Height = 375
Left = 4680
TabIndex = 54
Top = 7440
Width = 375
End
Begin VB.CommandButton GGet
Caption = "G"
Height = 375
Left = 5160
TabIndex = 53
Top = 7440
Width = 375
End
Begin VB.CommandButton GSGet
Caption = "G"
Height = 375
Left = 5160
TabIndex = 52
Top = 6960
Width = 375
End
Begin VB.CommandButton GSPut
Caption = "P"
Height = 375
Left = 4680
TabIndex = 51
Top = 6960
Width = 375
End
Begin VB.TextBox GSValue
Height = 285
Left = 3240
TabIndex = 50
Top = 6960
Width = 1335
End
Begin VB.TextBox GSName
Height = 285
Left = 1320
TabIndex = 49
Top = 6960
Width = 1815
End
Begin VB.CommandButton GetDIP
Caption = "G"
Height = 375
Left = 5160
TabIndex = 47
Top = 6480
Width = 375
End
Begin VB.CommandButton PutDIP
Caption = "P"
Height = 375
Left = 4680
TabIndex = 46
Top = 6480
Width = 375
End
Begin VB.TextBox DipValue
Height = 285
Left = 3600
TabIndex = 45
Text = "0"
Top = 6480
Width = 975
End
Begin VB.TextBox DipBank
Height = 285
Left = 3000
MaxLength = 1
TabIndex = 44
Text = "0"
Top = 6480
Width = 495
End
Begin VB.CommandButton GetLamp
Caption = "L?"
Height = 375
Left = 1920
TabIndex = 42
Top = 6480
Width = 375
End
Begin VB.TextBox LampNo
Height = 285
Left = 1320
TabIndex = 41
Text = "0"
Top = 6480
Width = 495
End
Begin VB.CheckBox DebugBox
Caption = "MAME Debug"
Height = 255
Left = 2040
TabIndex = 39
Top = 5280
Width = 1335
End
Begin VB.CommandButton GetSwitch
Caption = "S?"
Height = 375
Left = 5040
TabIndex = 38
Top = 6000
Width = 375
End
Begin VB.CommandButton ClearSwitch
Caption = "Clear Switch"
Height = 375
Left = 3480
TabIndex = 37
Top = 6000
Width = 1455
End
Begin VB.CommandButton SetSwitch
Caption = "Set Switch"
Height = 375
Left = 1920
TabIndex = 36
Top = 6000
Width = 1455
End
Begin VB.TextBox SwitchNo
Height = 285
Left = 1320
TabIndex = 34
Text = "0"
Top = 6000
Width = 495
End
Begin VB.TextBox HandleMech
Height = 285
Left = 1320
TabIndex = 32
Text = "0"
Top = 5640
Width = 495
End
Begin VB.TextBox ImgDir
Enabled = 0 'False
Height = 285
Left = 960
TabIndex = 30
Top = 4080
Width = 3375
End
Begin VB.CommandButton Pathes
Caption = "Pathes"
Height = 375
Left = 4440
TabIndex = 29
Top = 2640
Width = 1095
End
Begin VB.CommandButton CheckRoms
Caption = "Check ROMS"
Height = 375
Left = 1560
TabIndex = 28
Top = 7920
Width = 1215
End
Begin VB.CheckBox DoubleSize
Caption = "Double Size"
Height = 255
Left = 120
TabIndex = 27
Top = 5280
Width = 1815
End
Begin VB.CheckBox ShowFrame
Caption = "Show Frame"
Enabled = 0 'False
Height = 255
Left = 2040
TabIndex = 26
Top = 4800
Value = 1 'Checked
Width = 1335
End
Begin VB.TextBox MechNo
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1031
SubFormatType = 1
EndProperty
Height = 285
Left = 4200
TabIndex = 24
Text = "0"
Top = 4560
Width = 495
End
Begin VB.CommandButton GetMech
Caption = "GetMech"
Height = 375
Left = 4200
TabIndex = 23
Top = 4920
Width = 1215
End
Begin VB.CheckBox ShowDMDOnly
Caption = "Show DMD Only"
Height = 255
Left = 120
TabIndex = 22
Top = 5040
Width = 1815
End
Begin VB.CheckBox ShowTitle
Caption = "Show Title"
Height = 255
Left = 120
TabIndex = 21
Top = 4800
Width = 1815
End
Begin VB.CheckBox EnableKeyboard
Caption = "Enable Keyboard"
Height = 255
Left = 120
TabIndex = 20
Top = 4560
Value = 1 'Checked
Width = 1815
End
Begin VB.CommandButton About
Caption = "About"
Height = 375
Left = 4320
TabIndex = 19
Top = 7920
Width = 1215
End
Begin VB.ComboBox GameNames
Height = 315
ItemData = "VPinMAMETest.frx":0000
Left = 120
List = "VPinMAMETest.frx":0002
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 18
Top = 120
Width = 1095
End
Begin VB.CommandButton Options
Caption = "Options"
Height = 375
Left = 2880
TabIndex = 17
Top = 7920
Width = 1335
End
Begin VB.CommandButton ResumeButton
Caption = "Resume"
Height = 375
Left = 4560
TabIndex = 16
Top = 120
Width = 975
End
Begin VB.CommandButton PauseButton
Caption = "Pause"
Height = 375
Left = 3480
TabIndex = 15
Top = 120
Width = 975
End
Begin VB.TextBox SampleDirs
Enabled = 0 'False
Height = 285
Left = 945
TabIndex = 13
Top = 3720
Width = 3375
End
Begin VB.TextBox NVRamDir
Enabled = 0 'False
Height = 285
Left = 945
TabIndex = 11
Top = 3360
Width = 3375
End
Begin VB.TextBox CfgDir
Enabled = 0 'False
Height = 285
Left = 945
TabIndex = 9
Top = 3000
Width = 3375
End
Begin VB.TextBox RomDirs
Enabled = 0 'False
Height = 285
Left = 945
TabIndex = 7
Top = 2640
Width = 3375
End
Begin VB.ListBox SolenoidList
Height = 1425
Left = 120
TabIndex = 6
Top = 600
Width = 5415
End
Begin VB.CommandButton EscapeButton
Caption = "Escape"
Height = 375
Left = 1065
TabIndex = 5
Top = 2160
Width = 975
End
Begin VB.CommandButton DownButton
Caption = "Down"
Height = 375
Left = 2145
TabIndex = 4
Top = 2160
Width = 975
End
Begin VB.CommandButton UpButton
Caption = "Up"
Height = 375
Left = 3225
TabIndex = 3
Top = 2160
Width = 975
End
Begin VB.CommandButton StopButton
Caption = "Stop"
Height = 375
Left = 2400
TabIndex = 2
Top = 120
Width = 975
End
Begin VB.CommandButton StartButton
Caption = "Start"
Default = -1 'True
Height = 375
Left = 1320
TabIndex = 1
Top = 120
Width = 975
End
Begin VB.CommandButton EnterButton
Caption = "Enter"
Height = 375
Left = 4305
TabIndex = 0
Top = 2160
Width = 975
End
Begin VB.Label Label3
Caption = "Global settings"
Height = 255
Left = 120
TabIndex = 57
Top = 7440
Width = 1095
End
Begin VB.Label slsl
Caption = "Game settings"
Height = 255
Left = 120
TabIndex = 48
Top = 6960
Width = 1095
End
Begin VB.Label Label2
Caption = "DIP:"
Height = 255
Left = 2520
TabIndex = 43
Top = 6480
Width = 495
End
Begin VB.Label Label1
Caption = "Lamp"
Height = 255
Left = 120
TabIndex = 40
Top = 6480
Width = 975
End
Begin VB.Label Label7
Caption = "Switch"
Height = 255
Left = 120
TabIndex = 35
Top = 6000
Width = 975
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "HandleMech"
Height = 195
Left = 120
TabIndex = 33
Top = 5640
Width = 915
End
Begin VB.Label Label5
Caption = "Images"
Height = 255
Left = 120
TabIndex = 31
Top = 4080
Width = 735
End
Begin VB.Label MechResult
BorderStyle = 1 'Fixed Single
Height = 255
Left = 4800
TabIndex = 25
Top = 4560
Width = 615
End
Begin VB.Label SampleLabel
Caption = "Samples"
Height = 255
Left = 105
TabIndex = 14
Top = 3720
Width = 735
End
Begin VB.Label NVRamLabel
Caption = "NVRAM"
Height = 255
Left = 105
TabIndex = 12
Top = 3360
Width = 735
End
Begin VB.Label CfgLabel
Caption = "Cfg"
Height = 255
Left = 105
TabIndex = 10
Top = 3000
Width = 735
End
Begin VB.Label ROMLabel
Caption = "ROMs"
Height = 255
Left = 105
TabIndex = 8
Top = 2640
Width = 735
End
End
Attribute VB_Name = "VPinMAMETest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const S11_SWADVANCE = -1
Const S11_SWUPDN = -2
Const S11_SWCPUDIAG = -3
Const S11_SWSOUNDDIAG = -4
Const WPC_Escape = 5
Const WPC_Down = 6
Const WPC_Up = 7
Const WPC_Enter = 8
Dim WithEvents Controller As Controller
Attribute Controller.VB_VarHelpID = -1
Private Sub About_Click()
Controller.ShowAboutDialog 1
End Sub
Private Sub BorderSizeX_Change()
If (BorderSizeX.Text <> "") Then
Controller.BorderSizeX = CInt(BorderSizeX.Text)
End If
End Sub
Private Sub BorderSizeY_Change()
If (BorderSizeY.Text <> "") Then
Controller.BorderSizeY = CInt(BorderSizeY.Text)
End If
End Sub
Private Sub CheckRoms_Click()
If (Not Controller.CheckRoms(0)) Then
MsgBox "ROM set is invalid"
End If
End Sub
Private Sub Command1_Click()
Dim x
For x = 1 To SolenoidList.ListCount
SolenoidList.RemoveItem (0)
Next
End Sub
Private Sub DebugBox_Click()
If (Controller.Version < "01200000") Then Exit Sub
Controller.Games(Controller.GameName).Settings.Value("debug") = DebugBox.Value
End Sub
Private Sub DoubleSize_Click()
Controller.DoubleSize = DoubleSize.Value
End Sub
Private Sub EnableKeyboard_Click()
Controller.HandleKeyboard = EnableKeyboard.Value
End Sub
Private Sub GameNames_Click()
If (GameNames.Text = "<Default>") Then
StartButton.Enabled = False
Controller.GameName = ""
UpdateSettings
Else
StartButton.Enabled = True
Controller.GameName = GameNames.Text
UpdateSettings
End If
End Sub
Private Sub GetDIP_Click()
DipValue.Text = "&H" + Hex(Controller.Dip(CInt(DipBank.Text)))
End Sub
Private Sub GetMech_Click()
MechResult.Caption = Controller.GetMech(MechNo.Text)
End Sub
Private Sub GetSwitch_Click()
If (Controller.Switch(Int(SwitchNo.Text))) Then
MsgBox ("Switch is set")
Else
MsgBox ("Switch is cleared")
End If
End Sub
Private Sub GSGet_Click()
If (Controller.Version < "01200000") Then Exit Sub
If (Controller.GameName <> "") Then
GSValue.Text = Controller.Games(Controller.GameName).Settings.Value(GSName)
End If
End Sub
Private Sub GSPut_Click()
If (Controller.Version < "01200000") Then Exit Sub
If (Controller.GameName <> "") Then
Controller.Games(Controller.GameName).Settings.Value(GSName) = GSValue.Text
End If
End Sub
Private Sub GGet_Click()
If (Controller.Version < "01200000") Then Exit Sub
GValue.Text = Controller.Settings.Value(GName)
End Sub
Private Sub GPut_Click()
If (Controller.Version < "01200000") Then Exit Sub
Controller.Settings.Value(GName) = GValue.Text
End Sub
Private Sub Options_Click()
Controller.ShowOptsDialog 0
End Sub
Private Sub Pathes_Click()
Controller.ShowPathesDialog 0
End Sub
Private Sub PauseButton_Click()
Controller.Pause = 1
ResumeButton.Enabled = True
PauseButton.Enabled = False
End Sub
Private Sub PutDIP_Click()
Controller.Dip(CInt(DipBank.Text)) = CInt(DipValue.Text)
End Sub
Private Sub ResumeButton_Click()
Controller.Pause = 0
PauseButton.Enabled = True
ResumeButton.Enabled = False
End Sub
Private Sub EscapeButton_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
If Controller.WPCNumbering Then
Controller.Switch(WPC_Escape) = 1
Else
If (Controller.Switch(S11_SWUPDN)) Then
Controller.Switch(S11_SWUPDN) = 0
Else
Controller.Switch(S11_SWUPDN) = 1
End If
End If
End Sub
Private Sub EscapeButton_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
If Controller.WPCNumbering Then
Controller.Switch(WPC_Escape) = 0
Else
Controller.Switch(S11_SWUPDN) = 0
' Controller.Switch(-6) = True
End If
End Sub
Private Sub DownButton_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
If Controller.WPCNumbering Then
Controller.Switch(WPC_Down) = 1
Else
Controller.Switch(S11_SWCPUDIAG) = 1
End If
End Sub
Private Sub DownButton_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
If Controller.WPCNumbering Then
Controller.Switch(WPC_Down) = 0
Else
Controller.Switch(S11_SWCPUDIAG) = 0
End If
End Sub
Private Sub GetLamp_Click()
If (Controller.Lamp(Int(LampNo.Text))) Then
MsgBox ("Lamp is on")
Else
MsgBox ("Lamp if off")
End If
End Sub
Private Sub SetSwitch_Click()
Dim swNo As Integer
swNo = Int(SwitchNo.Text)
' swNo = ((swNo \ 10) + 1) + ((swNo Mod 10) + 1) * 10
Controller.Switch(swNo) = True
End Sub
Private Sub ClearSwitch_Click()
Dim swNo As Integer
swNo = Int(SwitchNo.Text)
' swNo = ((swNo \ 10) + 1) + ((swNo Mod 10) + 1) * 10
Controller.Switch(swNo) = False
End Sub
Private Sub ShowDMDOnly_Click()
Controller.ShowDMDOnly = CBool(ShowDMDOnly.Value)
End Sub
Private Sub ShowFrame_Click()
Controller.ShowFrame = CBool(ShowFrame.Value)
End Sub
Private Sub ShowTitle_Click()
Controller.ShowTitle = CBool(ShowTitle.Value)
ShowFrame.Enabled = ShowTitle.Value = 0
End Sub
Private Sub UpButton_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
If Controller.WPCNumbering Then
Controller.Switch(WPC_Up) = 1
Else
Controller.Switch(S11_SWSOUNDDIAG) = 1
End If
End Sub
Private Sub UpButton_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
If Controller.WPCNumbering Then
Controller.Switch(WPC_Up) = 0
Else
Controller.Switch(S11_SWSOUNDDIAG) = 0
End If
End Sub
Private Sub EnterButton_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
If Controller.WPCNumbering Then
Controller.Switch(WPC_Enter) = 1
Else
Controller.Switch(S11_SWADVANCE) = 1
End If
End Sub
Private Sub EnterButton_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
If Controller.WPCNumbering Then
Controller.Switch(WPC_Enter) = 0
Else
Controller.Switch(S11_SWADVANCE) = 0
End If
End Sub
Private Sub StartButton_Click()
Controller.SplashInfoLine = "Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext" & vbCrLf & "Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext" & vbCrLf & "Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext"
Controller.HandleMechanics = HandleMech.Text
Controller.Dip(0) = &H40
Controller.Dip(1) = &HC1
Controller.Dip(2) = &HCB
Controller.Dip(3) = &H3F
On Error Resume Next
Controller.Run 0
If (Err = 0) Then
SetButtons 1
'SetButtons 2 -Doesn't work
Else
MsgBox Err.Description, vbOKOnly
End If
End Sub
Private Sub StopButton_Click()
Controller.Stop
SetButtons 0
End Sub
Private Sub UpdateSettings()
If (Controller.HandleKeyboard) Then
EnableKeyboard.Value = 1
Else
EnableKeyboard.Value = 0
End If
If (Controller.ShowDMDOnly) Then
ShowDMDOnly.Value = 1
Else
ShowDMDOnly.Value = 0
End If
If (Controller.ShowTitle) Then
ShowTitle.Value = 1
Else
ShowTitle.Value = 0
End If
If (Controller.DoubleSize) Then
DoubleSize.Value = 1
Else
DoubleSize.Value = 0
End If
If (Controller.Version >= "01200000") Then
If (Controller.Games(Controller.GameName).Settings.Value("debug")) Then
DebugBox.Value = 1
Else
DebugBox.Value = 0
End If
End If
End Sub
Private Sub Form_Load()
SetButtons 0
Set Controller = CreateObject("VPinMAME.Controller")
DebugBox.Enabled = (Controller.Version >= "01200000")
UpdateSettings
EnableKeyboard.Value = 1
HandleMech.Text = 255
Dim Machines, GameName
GameNames.AddItem ("<Default>")
If GetSetting("VPinMAMETest", "Settings", "GameName", "NotFound") = "NotFound" Then
SaveSetting "VPinMAMETest", "Settings", "GameName", "<Default>"
End If
Machines = Controller.Machines
If (Not IsEmpty(Machines)) Then
For Each GameName In Machines
GameNames.AddItem (GameName)
Next
End If
' GameNames.Text = "<Default>"
GameNames.Text = GetSetting("VPinMAMETest", "Settings", "GameName")
End Sub
Private Sub Form_Unload(Cancel As Integer)
SaveSetting "VPinMAMETest", "Settings", "GameName", GameNames.Text
Set Controller = Nothing
End Sub
Private Sub Controller_OnStateChange(ByVal nState As Long)
SetButtons nState
End Sub
Private Sub Controller_OnSolenoid(ByVal nSolenoid As Long, ByVal IsActive As Long)
Dim Msg As String
Msg = "Solenoid " & nSolenoid & " is "
If (IsActive <> 0) Then
Msg = Msg & "on"
Else
Msg = Msg & "off"
End If
SolenoidList.AddItem (Msg)
SolenoidList.ListIndex = SolenoidList.ListCount - 1
SolenoidList.ListIndex = -1
End Sub
Private Sub SetButtons(ByVal i As Long)
StartButton.Enabled = (GameNames.Text <> "") And (i = 0)
StopButton.Enabled = (i = 1)
EscapeButton.Enabled = (i = 1)
DownButton.Enabled = (i = 1)
UpButton.Enabled = (i = 1)
EnterButton.Enabled = (i = 1)
PauseButton.Enabled = (i = 1)
ResumeButton.Enabled = (i = 1)
End Sub
Private Sub WindowPosX_Change()
If (WindowPosX.Text <> "") Then
Controller.WindowPosX = CInt(WindowPosX.Text)
End If
End Sub
Private Sub WindowPosY_Change()
If (WindowPosY.Text <> "") Then
Controller.WindowPosY = CInt(WindowPosY.Text)
End If
End Sub