-
Notifications
You must be signed in to change notification settings - Fork 2
/
frmMain.vb
6366 lines (3817 loc) · 218 KB
/
frmMain.vb
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
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Option Strict Off
Option Explicit On
Imports VB = Microsoft.VisualBasic
Friend Class frmMain
Inherits System.Windows.Forms.Form
Public Enum MENU_VIEW
TOOL_BAR
DIRECT_INPUT
STATUS_BAR
Max
End Enum
Public Enum MENU_OPTIONS
IGNORE_INPUT
TITLE_FILENAME
VERTICAL_INFO
LANE_BGCOLOR
SELECT_PREVIEW
MOVE_ON_GRID
OBJ_FILENAME
USE_OLD_FORMAT
'RCLICK_DELETE
Max
End Enum
Public Structure LineData
Public pt1 As Point
Public pt2 As Point
Public Visible As Boolean
End Structure
Private _linStatusBar_0 As LineData
Private _linStatusBar_1 As LineData
Private _linToolbarBottom_0 As LineData
Private _linToolbarBottom_1 As LineData
Private _linHeader_0 As LineData
Private _linHeader_1 As LineData
Private _linVertical_0 As LineData
Private _linVertical_1 As LineData
Private _linDirectInput_0 As LineData
Private _linDirectInput_1 As LineData
Public stringFont As Font
Private m_intScrollDir As Integer
Private m_tempObj() As g_udtObj
Private m_blnMouseDown As Boolean
Private m_blnPreview As Boolean
Private m_blnIgnoreMenu As Boolean
Public Function lngFromString(ByRef str_Renamed As String) As Integer
'If mnuOptionsItem(USE_OLD_FORMAT).Checked Then
'lngFromString = Val("&H" & str)
'Else
lngFromString = modInput.strToNum(str_Renamed)
'End If
End Function
Public Function lngFromLong(ByVal value As Integer) As Integer
'If mnuOptionsItem(USE_OLD_FORMAT).Checked Then
'lngFromLong = modInput.strToNum(strFromLong(value))
'Else
lngFromLong = value
'End If
End Function
Public Function strFromLong(ByVal value As Integer) As String
'If mnuOptionsItem(USE_OLD_FORMAT).Checked Then
'strFromLong = right$("0" & Hex$(value), 2)
'Else
strFromLong = modInput.strFromNum(value)
'End If
End Function
Private Sub MoveObj(ByVal X As Single, ByVal Y As Single, ByVal Shift As Keys)
On Error GoTo Err_Renamed
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim lngTemp As Integer
Dim oldObj As g_udtObj
Dim newObj As g_udtObj
With newObj
Call modDraw.SetObjData(newObj, X, Y) ', g_disp.X, g_disp.Y)
.intCh = g_intVGridNum(.intCh)
'If Not Shift And vbAltMask Then
'グリッドにあわせる
If DirectCast(Me.cboDispGridSub.SelectedItem, modMain.ItemWithData).ItemData Then
lngTemp = 192 \ (DirectCast(Me.cboDispGridSub.SelectedItem, modMain.ItemWithData).ItemData)
.lngPosition = (.lngPosition \ lngTemp) * lngTemp
'If Not Shift And vbShiftMask Then
If Me._mnuOptionsItem_5.Checked Then
With g_Obj(g_Obj(UBound(g_Obj)).lngHeight)
lngTemp = .lngPosition - (.lngPosition \ lngTemp) * lngTemp
End With
.lngPosition = .lngPosition - lngTemp
End If
'End If
End If
'End If
.lngPosition = .lngPosition + g_Measure(.intMeasure).lngY
End With
oldObj = g_Obj(g_Obj(UBound(g_Obj)).lngHeight)
With oldObj
.intCh = g_intVGridNum(.intCh)
'If Not Shift And vbAltMask Then
If DirectCast(Me.cboDispGridSub.SelectedItem, modMain.ItemWithData).ItemData Then
lngTemp = 192 \ DirectCast(Me.cboDispGridSub.SelectedItem, modMain.ItemWithData).ItemData
.lngPosition = (.lngPosition \ lngTemp) * lngTemp
End If
'End If
.lngPosition = .lngPosition + g_Measure(.intMeasure).lngY
End With
'Y 軸固定移動
If Shift And Keys.Shift Then
newObj.lngPosition = oldObj.lngPosition
End If
'移動している?
If newObj.intCh <> oldObj.intCh Or newObj.lngPosition <> oldObj.lngPosition Then
'右に移動
If newObj.intCh > oldObj.intCh Then
For j = oldObj.intCh To newObj.intCh - 1
If g_VGrid(j).blnDraw = True And g_VGrid(j).intCh <> 0 Then
newObj.intAtt = newObj.intAtt + 1
End If
Next j
ElseIf newObj.intCh < oldObj.intCh Then '左に移動
For j = oldObj.intCh To newObj.intCh + 1 Step -1
If g_VGrid(j).blnVisible = True And g_VGrid(j).intCh <> 0 Then
newObj.intAtt = newObj.intAtt + 1
End If
Next j
End If
lngTemp = newObj.intCh <> oldObj.intCh And newObj.intCh <> 0 And oldObj.intCh <> 0 And newObj.intCh <> UBound(g_VGrid) And oldObj.intCh <> UBound(g_VGrid)
For i = 0 To UBound(g_Obj) - 1
With g_Obj(i)
'選択中
If .intSelect = modMain.OBJ_SELECT.Selected Then
'Y 軸移動
.lngPosition = .lngPosition + newObj.lngPosition - oldObj.lngPosition
'小節はまたいでいないか?
Do While .lngPosition >= g_Measure(.intMeasure).intLen
If .intMeasure < 999 Then
.lngPosition = .lngPosition - g_Measure(.intMeasure).intLen
.intMeasure = .intMeasure + 1
Else
.intMeasure = 999
Exit Do
End If
Loop
'逆に小節を切っていないか?
Do While .lngPosition < 0
If .intMeasure > 0 Then
.lngPosition = g_Measure(.intMeasure - 1).intLen + .lngPosition
.intMeasure = .intMeasure - 1
Else
.intMeasure = 0
Exit Do
End If
Loop
'移動しているが、位置は右端でも左端でもない
If lngTemp Then
If .intCh < 0 Then
j = .intCh
ElseIf .intCh > 1000 Then
j = .intCh - 1000
Else
j = g_intVGridNum(.intCh)
End If
If newObj.intCh > oldObj.intCh Then '右に移動
'移動量分ループ
For k = 1 To newObj.intAtt
'表示されているレーンをチェック
Do
j = j + 1
If j < 0 Or j > UBound(g_VGrid) Then Exit Do
If g_VGrid(j).blnVisible = True And g_VGrid(j).intCh <> 0 Then
Exit Do
End If
Loop
Next k
Else '左に移動
For k = 1 To newObj.intAtt
Do
j = j - 1
If j < 0 Or j > UBound(g_VGrid) Then Exit Do
If g_VGrid(j).blnVisible = True And g_VGrid(j).intCh <> 0 Then
Exit Do
End If
Loop
Next k
End If
'0未満の時は仮位置としてマイナスをあてる
If j < 0 Then
.intCh = j
ElseIf j > UBound(g_VGrid) Then '最大値以上なら仮位置として1000以上をあてる
.intCh = 1000 + j
Else 'それ以外なら普通に設定
.intCh = g_VGrid(j).intCh
End If
'チャンネルによって特殊な操作が必要?
Select Case .intCh
Case 8
'何もしない
Case 9
.sngValue = CInt(.sngValue)
If .sngValue < 0 Then
.sngValue = 1
End If
Case Else
.sngValue = CInt(.sngValue)
If .sngValue < 0 Then
.sngValue = 1
ElseIf .sngValue > 1295 Then
.sngValue = 1295
End If
End Select
End If
End If
End With
Next i
'Call modDraw.DrawStatusBar(g_Obj(UBound(g_Obj)).lngHeight, Shift)
Call modDraw.DrawStatusBar(g_Obj(g_Obj(UBound(g_Obj)).lngHeight))
'Call SaveChanges
picMain.Refresh()
End If
Exit Sub
Err_Renamed:
Call modMain.CleanUp(Err.Number, Err.Description, "MoveObj")
End Sub
Public Sub PreviewBMP(ByRef strFileName As String)
On Error GoTo Err_Renamed
If m_blnPreview = False Then Exit Sub
With frmWindowPreview
If .chkLock.CheckState Then Exit Sub
._txtBGAPara_0.Text = strFromLong(lstBMP.SelectedIndex + 1)
.Text = ._txtBGAPara_0.Text & ":" & strFileName
If Mid(strFileName, 2, 2) <> ":\" Then strFileName = g_BMS.strDir & strFileName
'UPGRADE_WARNING: Dir に新しい動作が指定されています。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' をクリックしてください。
If Len(strFileName) <> 0 And strFileName <> g_BMS.strDir And Dir(strFileName, FileAttribute.Normal) <> vbNullString Then
.picBackBuffer.Image = System.Drawing.Image.FromFile(strFileName)
Else
.picBackBuffer.Image = Nothing
End If
If .picBackBuffer.ClientRectangle.Width <= 256 Then
._txtBGAPara_1.Text = CStr(0)
._txtBGAPara_3.Text = CStr(.picBackBuffer.ClientRectangle.Width)
._txtBGAPara_5.Text = CStr((256 - .picBackBuffer.ClientRectangle.Width) \ 2)
Else
._txtBGAPara_1.Text = CStr((.picBackBuffer.ClientRectangle.Width - 256) \ 2)
._txtBGAPara_3.Text = CStr(CDbl(._txtBGAPara_1.Text) + 256)
._txtBGAPara_5.Text = CStr(0)
End If
._txtBGAPara_2.Text = CStr(0)
If .picBackBuffer.ClientRectangle.Height >= 256 Then
._txtBGAPara_4.Text = CStr(256)
Else
._txtBGAPara_4.Text = CStr(.picBackBuffer.ClientRectangle.Height)
End If
._txtBGAPara_6.Text = CStr(0)
Call .picPreview.Refresh()
End With
Err_Renamed:
End Sub
Private Sub PreviewBGA(ByVal lngFileNum As Integer)
On Error GoTo Err_Renamed
Dim strTemp As String
Dim strArray() As String
If m_blnPreview = False Then Exit Sub
With frmWindowPreview
If .chkLock.CheckState Then Exit Sub
'strTemp = Trim$(Mid$(lstBGA.List(lstBGA.ListIndex), 8))
strTemp = g_strBGA(lngFileNum)
strArray = Split(strTemp, " ")
If Len(strTemp) Then
strTemp = g_strBMP(modInput.strToNum(strArray(0)))
If Mid(strTemp, 2, 2) <> ":\" Then strTemp = g_BMS.strDir & strTemp
'UPGRADE_WARNING: Dir に新しい動作が指定されています。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' をクリックしてください。
If Dir(strTemp, FileAttribute.Normal) <> vbNullString Then
.picBackBuffer.Image = System.Drawing.Image.FromFile(strTemp)
Else
.picBackBuffer.Image = Nothing
End If
Else
.picBackBuffer.Image = Nothing
End If
If UBound(strArray) > 5 Then
._txtBGAPara_0.Text = strArray(0)
._txtBGAPara_1.Text = strArray(1)
If CDbl(._txtBGAPara_1.Text) < 0 Then ._txtBGAPara_1.Text = CStr(0)
._txtBGAPara_2.Text = strArray(2)
If CDbl(._txtBGAPara_2.Text) < 0 Then ._txtBGAPara_2.Text = CStr(0)
._txtBGAPara_3.Text = strArray(3)
If CDbl(._txtBGAPara_3.Text) < 0 Then ._txtBGAPara_3.Text = CStr(0)
._txtBGAPara_4.Text = strArray(4)
If CDbl(._txtBGAPara_4.Text) < 0 Then ._txtBGAPara_4.Text = CStr(0)
._txtBGAPara_5.Text = strArray(5)
If CDbl(._txtBGAPara_5.Text) < 0 Then ._txtBGAPara_5.Text = CStr(0)
._txtBGAPara_6.Text = strArray(6)
If CDbl(._txtBGAPara_6.Text) < 0 Then ._txtBGAPara_6.Text = CStr(0)
.Text = strFromLong(lstBGA.SelectedIndex + 1) & ":" & strTemp
End If
Call .picPreview.Refresh()
End With
Err_Renamed:
End Sub
Private Sub PreviewWAV(ByRef strFileName As String)
On Error GoTo Err_Renamed
Dim lngError As Integer
Dim strError As String = Space(256)
Dim strTemp As String = ""
If m_blnPreview = False Then Exit Sub
If Mid(strFileName, 2, 2) <> ":\" Then
strFileName = g_BMS.strDir & strFileName
End If
Call mciSendString("close PREVIEW", vbNullString, 0, 0)
Dim strArray() As String
strArray = Split(strFileName, ".")
Select Case UCase(strArray(UBound(strArray)))
Case "WAV" : strTemp = " type WaveAudio"
Case "MP3", "OGG" : strTemp = " type MPEGVideo"
End Select
lngError = mciSendString("open " & Chr(34) & strFileName & Chr(34) & strTemp & " alias PREVIEW", vbNullString, 0, 0)
If lngError Then
If mciGetErrorString(lngError, strError, 256) Then
strTemp = VB.Left(strError, InStr(strError, Chr(0)) - 1)
Else
strTemp = "不明なエラーです。"
End If
'Call modMain.DebugOutput(lngError, strTemp & Chr$(34) & strFileName & Chr$(34), "PreviewWAV", False)
End If
Call mciSendString("play PREVIEW notify", vbNullString, 0, Me.Handle)
Err_Renamed:
End Sub
Private Sub FormDragDrop(ByVal Data As String())
Dim i As Integer
Dim strArray() As String
Dim strTemp As String
Dim blnReadFlag As Boolean
For i = 0 To Data.Length - 1
'UPGRADE_WARNING: Dir に新しい動作が指定されています。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' をクリックしてください。
If Dir(Data(i), FileAttribute.Normal) <> vbNullString Then
strTemp = Data(i)
If VB.Right(UCase(strTemp), 4) = ".BMS" Or VB.Right(UCase(strTemp), 4) = ".BME" Or VB.Right(UCase(strTemp), 4) = ".BML" Or VB.Right(UCase(strTemp), 4) = ".PMS" Then
If modMain.intSaveCheck() Or blnReadFlag Then
'UPGRADE_WARNING: App プロパティ App.EXEName には新しい動作が含まれます。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"' をクリックしてください。
Call ShellExecute(0, "open", Chr(34) & g_strAppDir & My.Application.Info.AssemblyName & Chr(34), Chr(34) & strTemp & Chr(34), "", SW_SHOWNORMAL)
Else
Call lngDeleteFile(g_BMS.strDir & "___bmse_temp.bms")
strArray = Split(strTemp, "\")
g_BMS.strFileName = VB.Right(strTemp, Len(strArray(UBound(strArray))))
g_BMS.strDir = VB.Left(strTemp, Len(strTemp) - Len(strArray(UBound(strArray))))
dlgMainOpen.InitialDirectory = g_BMS.strDir
dlgMainSave.InitialDirectory = g_BMS.strDir
blnReadFlag = True
Call modInput.LoadBMS()
Call modMain.RecentFilesRotation(g_BMS.strDir & g_BMS.strFileName)
End If
End If
End If
Next i
End Sub
Private Sub CopyToClipboard()
Dim i As Integer
Dim intTemp As Integer
Dim lngTemp As Integer
Dim strArray() As String
Call My.Computer.Clipboard.Clear()
intTemp = 999
For i = 0 To UBound(g_Obj) - 1
With g_Obj(i)
If .intSelect = modMain.OBJ_SELECT.Selected Then
If .intMeasure < intTemp Then intTemp = .intMeasure
lngTemp = lngTemp + 1
End If
End With
Next i
ReDim strArray(lngTemp - 1)
lngTemp = 0
For i = 0 To UBound(g_Obj) - 1
With g_Obj(i)
If .intSelect = modMain.OBJ_SELECT.Selected Then
strArray(lngTemp) = Format(.intCh, "000") & .intAtt & Format(g_Measure(.intMeasure).lngY + .lngPosition - g_Measure(intTemp).lngY, "0000000") & .sngValue
lngTemp = lngTemp + 1
End If
End With
Next i
Call My.Computer.Clipboard.SetText("BMSE ClipBoard Object Data Format" & vbCrLf & Join(strArray, vbCrLf) & vbCrLf)
End Sub
Public Sub SaveChanges()
g_BMS.blnSaveFlag = False
Me.Text = g_strAppTitle
If Len(g_BMS.strDir) Then
If _mnuOptionsItem_1.Checked Then
Me.Text = Me.Text & " - " & g_BMS.strFileName
Else
Me.Text = Me.Text & " - " & g_BMS.strDir & g_BMS.strFileName
End If
End If
Me.Text = Me.Text & " *"
End Sub
Private Function strCmdDecode(ByRef strCmd As String, ByRef strFileName As String) As String
Dim ret As String
ret = strCmd
ret = Replace(ret, "<filename>", Chr(34) & strFileName & Chr(34))
ret = Replace(ret, "<measure>", g_disp.intStartMeasure)
ret = Replace(ret, "<appdir>", g_strAppDir)
strCmdDecode = ret
End Function
Public Sub RefreshList()
Dim i As Integer
Dim strTemp As String = Space(2)
Dim lngIndex(2) As Integer
lngIndex(0) = lstWAV.SelectedIndex
lngIndex(1) = lstBMP.SelectedIndex
lngIndex(2) = lstBGA.SelectedIndex
lstWAV.Visible = False
lstBMP.Visible = False
lstBGA.Visible = False
lstWAV.Items.Clear()
lstBMP.Items.Clear()
lstBGA.Items.Clear()
For i = 1 To 1295
'strTemp = Right$("0" & Hex$(i), 2)
'lngTemp = modInput.strToNum(strTemp)
strTemp = modInput.strFromNum(i)
modInput.strToNum(modInput.strFromNumZZ(i))
modMain.SetItemString(lstWAV, i - 1, "#WAV" & strTemp & ":" & g_strWAV(i))
modMain.SetItemString(lstBMP, i - 1, "#BMP" & strTemp & ":" & g_strBMP(i))
modMain.SetItemString(lstBGA, i - 1, "#BGA" & strTemp & ":" & g_strBGA(i))
Next i
' If mnuOptionsItem(USE_OLD_FORMAT).Checked Then
'
' For i = 1 To 255
'
' 'strTemp = Right$("0" & Hex$(i), 2)
' 'lngTemp = modInput.strToNum(strTemp)
'
' strTemp = strFromLong(i)
' lngTemp = lngFromLong(i)
'
' lstWAV.List(i - 1) = "#WAV" & strTemp & ":" & g_strWAV(lngTemp)
' lstBMP.List(i - 1) = "#BMP" & strTemp & ":" & g_strBMP(lngTemp)
' lstBGA.List(i - 1) = "#BGA" & strTemp & ":" & g_strBGA(lngTemp)
'
' Next i
'
' frmWindowPreview.cmdPreviewEnd.Caption = "FF"
'
' Else
'
' For i = 1 To 1295
'
' strTemp = modInput.strFromNum(i)
'
' lstWAV.List(i - 1) = "#WAV" & strTemp & ":" & g_strWAV(i)
' lstBMP.List(i - 1) = "#BMP" & strTemp & ":" & g_strBMP(i)
' lstBGA.List(i - 1) = "#BGA" & strTemp & ":" & g_strBGA(i)
'
' Next i
'
' frmWindowPreview.cmdPreviewEnd.Caption = "ZZ"
'
' End If
m_blnPreview = False
lstWAV.SelectedIndex = lngIndex(0)
lstBMP.SelectedIndex = lngIndex(1)
lstBGA.SelectedIndex = lngIndex(2)
m_blnPreview = True
lstWAV.Visible = True
lstBMP.Visible = True
lstBGA.Visible = True
End Sub
Private Sub cboDirectInput_Enter(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboDirectInput.Enter
Me.AcceptButton = cmdDirectInput
End Sub
Private Sub cboDirectInput_Leave(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboDirectInput.Leave
Me.AcceptButton = Nothing
End Sub
'UPGRADE_WARNING: イベント cboDispFrame.SelectedIndexChanged は、フォームが初期化されたときに発生します。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"' をクリックしてください。
Private Sub cboDispFrame_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboDispFrame.SelectedIndexChanged
Call modDraw.InitVerticalLine()
End Sub
Private Sub cboDispGridMain_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboDispGridMain.SelectedIndexChanged
picMain.Refresh()
End Sub
Private Sub cboDispGridSub_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboDispGridSub.SelectedIndexChanged
picMain.Refresh()
End Sub
Private Sub cboDispHeight_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboDispHeight.SelectedIndexChanged
Dim i As Integer
Dim sngTemp As Single
If Me.Visible = False Then Exit Sub
If cboDispHeight.SelectedIndex = cboDispHeight.Items.Count - 1 Then
With frmWindowInput
.lblMainDisp.Text = g_Message(modMain.Message.INPUT_SIZE)
.txtMain.Text = Format(g_disp.Height, "#0.00")
If .txtMain.Text = "100.00" Then .txtMain.Text = "1.00"
Call frmWindowInput.ShowDialog(Me)
sngTemp = System.Math.Round(Val(.txtMain.Text), 2)
If sngTemp <= 0 Then
sngTemp = g_disp.Height
ElseIf sngTemp > 16 Then
sngTemp = 16
End If
For i = 0 To cboDispHeight.Items.Count - 1
If DirectCast(Me.cboDispHeight.Items.Item(i), modMain.ItemWithData).ItemData = sngTemp * 100 Then
cboDispHeight.SelectedIndex = i
Exit For
ElseIf DirectCast(Me.cboDispHeight.Items.Item(i), modMain.ItemWithData).ItemData > sngTemp * 100 Then
Call cboDispHeight.Items.Insert(i, New modMain.ItemWithData("x" & Format(sngTemp, "#0.00"), sngTemp * 100))
cboDispHeight.SelectedIndex = i
Exit For
End If
Next i
End With
End If
picMain.Refresh()
End Sub
'UPGRADE_WARNING: イベント cboDispKey.SelectedIndexChanged は、フォームが初期化されたときに発生します。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"' をクリックしてください。
Private Sub cboDispKey_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboDispKey.SelectedIndexChanged
Call modDraw.InitVerticalLine()
End Sub
'UPGRADE_WARNING: イベント cboDispSC1P.SelectedIndexChanged は、フォームが初期化されたときに発生します。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"' をクリックしてください。
Private Sub cboDispSC1P_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboDispSC1P.SelectedIndexChanged
Call modDraw.InitVerticalLine()
End Sub
'UPGRADE_WARNING: イベント cboDispSC2P.SelectedIndexChanged は、フォームが初期化されたときに発生します。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"' をクリックしてください。
Private Sub cboDispSC2P_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboDispSC2P.SelectedIndexChanged
Call modDraw.InitVerticalLine()
End Sub
Private Sub cboDispWidth_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboDispWidth.SelectedIndexChanged
Dim i As Integer
Dim sngTemp As Single
If Me.Visible = False Then Exit Sub
If cboDispWidth.SelectedIndex = cboDispWidth.Items.Count - 1 Then
With frmWindowInput
.lblMainDisp.Text = g_Message(modMain.Message.INPUT_SIZE)
.txtMain.Text = Format(g_disp.Width, "#0.00")
If .txtMain.Text = "100.00" Then .txtMain.Text = "1.00"
Call frmWindowInput.ShowDialog(Me)
sngTemp = System.Math.Round(Val(.txtMain.Text), 2)
If sngTemp <= 0 Then
sngTemp = g_disp.Width
ElseIf sngTemp > 16 Then
sngTemp = 16
End If
For i = 0 To cboDispWidth.Items.Count - 1
If DirectCast(Me.cboDispWidth.Items.Item(i), modMain.ItemWithData).ItemData = sngTemp * 100 Then
cboDispWidth.SelectedIndex = i
Exit For
ElseIf DirectCast(Me.cboDispWidth.Items.Item(i), modMain.ItemWithData).ItemData > sngTemp * 100 Then
Call cboDispWidth.Items.Insert(i, New modMain.ItemWithData("x" & Format(sngTemp, "#0.00"), sngTemp * 100))
cboDispWidth.SelectedIndex = i
Exit For
End If
Next i
End With
End If
picMain.Refresh()
End Sub
'UPGRADE_WARNING: イベント cboPlayer.SelectedIndexChanged は、フォームが初期化されたときに発生します。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"' をクリックしてください。
Private Sub cboPlayer_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboPlayer.SelectedIndexChanged
Call modDraw.InitVerticalLine()
End Sub
Private Sub cboVScroll_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cboVScroll.SelectedIndexChanged
Dim NewLargeChange As Integer
vsbMain.SmallChange = DirectCast(Me.cboVScroll.SelectedItem, modMain.ItemWithData).ItemData
NewLargeChange = Me.vsbMain.SmallChange * 8
vsbMain.Maximum = vsbMain.Maximum + NewLargeChange - vsbMain.LargeChange
vsbMain.LargeChange = NewLargeChange
End Sub
Private Sub cmdBGAExcDown_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdBGAExcDown.Click
Call cmdBMPExcDown_Click(cmdBMPExcDown, New System.EventArgs())
End Sub
Private Sub cmdBGAExcUp_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdBGAExcUp.Click
Call cmdBMPExcUp_Click(cmdBMPExcUp, New System.EventArgs())
End Sub
Private Sub cmdBGAPreview_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdBGAPreview.Click
Call PreviewBGA(lstBGA.SelectedIndex + 1)
With frmWindowPreview
If Not .Visible Then
'Call .SetWindowSize
'.Left = frmMain.Left + (frmMain.Width - .Width) \ 2
'.Top = frmMain.Top + (frmMain.Height - .Height) \ 2
Call frmWindowPreview.Show(Me)
Else
Call frmWindowPreview.Close()
End If
Call picMain.Focus()
End With
End Sub
Private Sub cmdBMPExcDown_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdBMPExcDown.Click
Dim i As Integer
Dim lngChangeA As Integer
Dim lngChangeB As Integer
Dim strTemp As String
Dim lngIndex As Integer
Dim strArray() As String
With lstBMP
If .SelectedIndex = .Items.Count - 1 Then Exit Sub
'If mnuOptionsItem(USE_OLD_FORMAT).Checked Then
'lngChangeB = modInput.strToNum(Hex$(.ListIndex + 2))
'lngChangeA = modInput.strToNum(Hex$(.ListIndex + 1))
'Else
'lngChangeB = .ListIndex + 2
'lngChangeA = .ListIndex + 1
'End If
lngChangeB = lngFromLong(.SelectedIndex + 2)
lngChangeA = lngFromLong(.SelectedIndex + 1)