-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmainF.frm
1879 lines (1433 loc) · 58 KB
/
mainF.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
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
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "comctl32.ocx"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "richtx32.ocx"
Begin VB.Form mainF
Caption = "My Movie Manager"
ClientHeight = 9510
ClientLeft = 3165
ClientTop = 1575
ClientWidth = 15120
Icon = "mainF.frx":0000
LinkTopic = "Form1"
ScaleHeight = 10650
ScaleWidth = 20250
StartUpPosition = 2 'CenterScreen
WindowState = 2 'Maximized
Begin ComctlLib.Toolbar topBar
Align = 1 'Align Top
Height = 795
Left = 0
TabIndex = 1
Top = 0
Width = 20250
_ExtentX = 35719
_ExtentY = 1402
ButtonWidth = 1482
ButtonHeight = 1244
AllowCustomize = 0 'False
Wrappable = 0 'False
Appearance = 1
ImageList = "buttons"
_Version = 327682
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 11
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Style = 4
Object.Width = 7600
MixedState = -1 'True
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "Sort"
Key = "sorteR"
Object.ToolTipText = "Sort in Ascending or Descending order"
Object.Tag = ""
ImageIndex = 1
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "Sort By"
Key = "sortBy"
Object.Tag = ""
ImageIndex = 11
EndProperty
BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "sep"
Object.Tag = ""
Style = 4
Object.Width = 800
MixedState = -1 'True
EndProperty
BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "Play"
Key = "openMovie"
Object.ToolTipText = "Play The Selected Movie In Default Video Player"
Object.Tag = ""
ImageIndex = 3
EndProperty
BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "Folder"
Key = "openFolder"
Object.ToolTipText = "Open Folder Containing This Movie"
Object.Tag = ""
ImageIndex = 4
EndProperty
BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "Edit"
Key = "editMovie"
Object.ToolTipText = "Edit the Details of the Selected Movie"
Object.Tag = ""
ImageIndex = 5
EndProperty
BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "Remove"
Key = "isNoMovie"
Object.ToolTipText = "Remove This Movie From Database"
Object.Tag = ""
ImageIndex = 6
EndProperty
BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "Watched"
Key = "movieWatched"
Object.ToolTipText = "Mark This Movie as Watched"
Object.Tag = ""
ImageIndex = 7
Style = 1
EndProperty
BeginProperty Button10 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "Favourite"
Key = "addFav"
Object.ToolTipText = "Add/Remove This Movie From Favourites"
Object.Tag = ""
ImageIndex = 8
EndProperty
BeginProperty Button11 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "IMDb"
Key = "goToImdb"
Object.ToolTipText = "See this Movie at www.imdb.com"
Object.Tag = ""
ImageIndex = 9
EndProperty
EndProperty
BorderStyle = 1
Begin VB.OptionButton nWatched
Caption = "Not Watched"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 6120
TabIndex = 11
TabStop = 0 'False
Top = 490
Width = 1335
End
Begin VB.OptionButton Watched
Caption = "Watched"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 6120
TabIndex = 10
TabStop = 0 'False
Top = 240
Width = 1095
End
Begin VB.OptionButton All
Caption = "All Movies"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 6120
TabIndex = 9
TabStop = 0 'False
Top = 0
Value = -1 'True
Width = 1095
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000018&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 255
Left = 75
ScaleHeight = 255
ScaleWidth = 2700
TabIndex = 5
Top = 550
Visible = 0 'False
Width = 2700
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Type and Press Enter to Search"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 165
TabIndex = 6
Top = 0
Width = 2310
End
End
Begin VB.ComboBox Genre
BeginProperty Font
Name = "Arial"
Size = 11.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
ItemData = "mainF.frx":C84A
Left = 4440
List = "mainF.frx":C84C
Style = 2 'Dropdown List
TabIndex = 4
TabStop = 0 'False
Top = 150
Width = 1575
End
Begin VB.ComboBox searchBy
BeginProperty Font
Name = "Arial"
Size = 11.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
Style = 2 'Dropdown List
TabIndex = 3
TabStop = 0 'False
ToolTipText = "Select "
Top = 150
Width = 1455
End
Begin VB.TextBox searchBox
BeginProperty Font
Name = "Arial"
Size = 11.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 75
TabIndex = 2
Top = 150
Width = 2700
End
End
Begin ComctlLib.ListView movieHolder
Height = 10230
Left = 120
TabIndex = 0
Top = 810
Width = 9015
_ExtentX = 15901
_ExtentY = 18045
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = -1 'True
_Version = 327682
ForeColor = -2147483640
BackColor = -2147483643
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 0
End
Begin VB.Frame movieDetails
Caption = "Movie Details"
BeginProperty Font
Name = "Arial"
Size = 11.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 9615
Left = 9360
TabIndex = 7
Top = 810
Width = 10935
Begin ComctlLib.Slider ratinG
Height = 270
Left = 1680
TabIndex = 14
TabStop = 0 'False
Top = 9120
Width = 3135
_ExtentX = 5530
_ExtentY = 476
_Version = 327682
LargeChange = 1
End
Begin RichTextLib.RichTextBox movieDispPanel
Height = 7335
Left = 240
TabIndex = 8
TabStop = 0 'False
Top = 360
Width = 9015
_ExtentX = 15901
_ExtentY = 12938
_Version = 393217
BorderStyle = 0
Enabled = -1 'True
ScrollBars = 3
Appearance = 0
TextRTF = $"mainF.frx":C84E
End
Begin VB.Label rateVal
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "( 0 / 10 )"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 240
Left = 4920
TabIndex = 15
Top = 9120
Width = 735
End
Begin VB.Label rateThis
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "RateThis Movie : "
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 240
Left = 120
TabIndex = 13
Top = 9120
Width = 1635
End
End
Begin VB.Label statusS
Height = 735
Left = 9240
TabIndex = 12
Top = 1440
Visible = 0 'False
Width = 135
End
Begin ComctlLib.ImageList forSmallIcons
Left = 9360
Top = 1440
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
MaskColor = 12632256
_Version = 327682
End
Begin ComctlLib.ImageList buttons
Left = 9360
Top = 2160
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 25
ImageHeight = 25
MaskColor = -2147483641
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 11
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":C8D0
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":CFDE
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":D6EC
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":DDFA
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":E508
Key = ""
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":EC16
Key = ""
EndProperty
BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":F324
Key = ""
EndProperty
BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":FA32
Key = ""
EndProperty
BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":10140
Key = ""
EndProperty
BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":1084E
Key = ""
EndProperty
BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mainF.frx":10F5C
Key = ""
EndProperty
EndProperty
End
Begin ComctlLib.ImageList forIcons
Left = 9360
Top = 720
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
MaskColor = 12632256
_Version = 327682
End
Begin VB.Menu mnu
Caption = "&Menu"
Begin VB.Menu addRem
Caption = "&Add / Remove Wached Folders"
End
Begin VB.Menu sp
Caption = "-"
End
Begin VB.Menu scn
Caption = "&Scan Watched Folders"
End
Begin VB.Menu upImdb
Caption = "&Update Details From IMDb"
End
Begin VB.Menu sp2
Caption = "-"
End
Begin VB.Menu ext
Caption = "E&xit"
End
End
Begin VB.Menu sortMenu
Caption = "&Sort"
Begin VB.Menu srtBy
Caption = "Sort &By"
Begin VB.Menu srtDateAdded
Caption = "Date Added"
Checked = -1 'True
End
Begin VB.Menu srtTitle
Caption = "&Title"
Checked = -1 'True
End
Begin VB.Menu srtYear
Caption = "&Year"
Checked = -1 'True
End
Begin VB.Menu srtImdb
Caption = "&IMDb Rating"
Checked = -1 'True
End
Begin VB.Menu srtMy
Caption = "Your &Rating"
Checked = -1 'True
End
End
Begin VB.Menu srtOrder
Caption = "Sort &Order"
Begin VB.Menu srtAsc
Caption = "&Ascending"
Checked = -1 'True
End
Begin VB.Menu srtDec
Caption = "&Descending"
Checked = -1 'True
End
End
End
Begin VB.Menu hlp
Caption = "&Help"
Begin VB.Menu abt
Caption = "&About"
End
Begin VB.Menu wb
Caption = "&Website"
End
End
End
Attribute VB_Name = "mainF"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim lastInd As Long
Dim genreIsReady As Boolean
Private Declare Function HideCaret Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const WM_PASTE = &H302
Function displayMovies()
Dim numMovie As Long
On Error GoTo displayMovies_Error
movieHolder.ListItems.Clear
Dim lItem, lItem2 As ListItem
Dim iHaHa
For iHaHa = 0 To 6
movieHolder.ColumnHeaders.Add , , str(iHaHa)
Next
numMovie = UBound(movieArray) - LBound(movieArray)
'For i = 1 To numMovie
' movieArray(i).MovieSearchRelevance = -1
'Next
'Pre-Adding List
movieHolder.Icons = buttons
forSmallIcons.ListImages.Clear
forSmallIcons.ListImages.Add , , LoadPicture(App.path & "\Images\defaultCover.jpg")
movieHolder.Icons = forSmallIcons
forIcons.ListImages.Clear
Dim searchI As Long
'Adding List
For searchI = LBound(movieArray) To UBound(movieArray) - 1
If (Not movieArray(searchI).MovieSearchRelevance = 0) And movieArray(searchI).MovieDisplayFlag = True And movieArray(searchI).isMovie = "Yes" And movieArray(searchI).wacthedCategory = True Then
Set lItem2 = movieHolder.ListItems.Add
lItem2.Text = movieArray(searchI).MovieTitle
lItem2.SubItems(1) = movieArray(searchI).MovieYear
lItem2.SubItems(2) = movieArray(searchI).MovieIMDbRating
lItem2.SubItems(3) = movieArray(searchI).MovieMyRating
lItem2.SubItems(4) = movieArray(searchI).MovieSearchRelevance
lItem2.SubItems(5) = movieArray(searchI).movieIdentifier
lItem2.SubItems(6) = movieArray(searchI).DateAdded
Set lItem = forIcons.ListImages.Add(, , movieArray(searchI).MovieIcon)
movieHolder.Icons = forIcons
lItem2.Icon = lItem.Index
End If
Next
movieHolder.Arrange = lvwAutoLeft
movieHolder.Arrange = lvwAutoTop
movieHolder.Refresh
movieHolder.Sorted = True
movieDispPanel.SelAlignment = rtfCenter
movieDispPanel.TextRTF = ""
movieDispPanel.Font = "Arial"
movieDispPanel.SelFontSize = 14
movieDispPanel.SelColor = vbRed
movieDispPanel.SelFontName = "Arial"
movieDispPanel.SelText = "No Movies To Display"
topBar.buttons(9).Value = tbrUnpressed
If movieHolder.ListItems.Count > 0 Then
movieHolder.SelectedItem = movieHolder.ListItems(1)
movieHolder.SelectedItem.EnsureVisible
movieHolder_ItemClick movieHolder.ListItems(1)
End If
movieHolder.Refresh
'movieHolder.SetFocus
'''''''''''
movieHolder.Sorted = True
movieHolder.SortKey = 6
movieHolder.SortOrder = lvwDescending
If movieHolder.SortOrder = lvwDescending Then
topBar.buttons(2).Image = 1
srtDec.Checked = True
srtAsc.Checked = False
Else
topBar.buttons(2).Image = 2
srtDec.Checked = False
srtAsc.Checked = True
End If
srtTitle.Checked = False
srtYear.Checked = False
srtImdb.Checked = False
srtMy.Checked = False
srtDateAdded.Checked = True
On Error GoTo 0
Exit Function
displayMovies_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure displayMovies of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Function
Private Sub abt_Click()
aboutFrm.Show 1
End Sub
Private Sub addRem_Click()
On Error GoTo addRem_Click_Error
addFolders.Show 1
On Error GoTo 0
Exit Sub
addRem_Click_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure addRem_Click of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub All_Click()
On Error GoTo All_Click_Error
If All.Value = True Then
Dim i
For i = LBound(movieArray) To UBound(movieArray)
movieArray(i).wacthedCategory = True
Next
End If
displayMovies
On Error GoTo 0
Exit Sub
All_Click_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure All_Click of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub ext_Click()
On Error GoTo ext_Click_Error
Unload Me
On Error GoTo 0
Exit Sub
ext_Click_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure ext_Click of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub Form_initialize()
On Error GoTo Form_initialize_Error
searchBox.Text = "Search Movies"
searchBox.Alignment = vbCenter
searchBox.FontItalic = True
searchBox.ForeColor = RGB(100, 100, 100)
srtTitle.Checked = True
srtYear.Checked = False
srtImdb.Checked = False
srtMy.Checked = False
srtAsc.Checked = True
srtDec.Checked = False
On Error GoTo 0
Exit Sub
Form_initialize_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure Form_initialize of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub Form_Load()
On Error GoTo Form_Load_Error
searchBy.AddItem "Title"
searchBy.AddItem "Director"
searchBy.AddItem "Cast"
searchBy.AddItem "Plot"
searchBy.AddItem "Year"
searchBy.AddItem "Language"
searchBy.AddItem "Country"
searchBy.AddItem "FileName"
searchBy.ListIndex = 0
HideCaret movieDispPanel.hWnd
On Error GoTo 0
Exit Sub
Form_Load_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure Form_Load of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub Form_Resize()
On Error GoTo Form_Resize_Error
On Error Resume Next
If Me.Width / Screen.TwipsPerPixelX < 1024 Then Me.Width = 1024 * Screen.TwipsPerPixelX
If Me.Height / Screen.TwipsPerPixelY < 700 Then Me.Height = 700 * Screen.TwipsPerPixelY
Dim mW, kk
mW = mainF.Width / 2 + 700
kk = mW / (Screen.TwipsPerPixelX * 148)
kk = Round(kk, 0)
mW = kk * (Screen.TwipsPerPixelX * 148) + 200
movieHolder.Move movieHolder.Left, movieHolder.Top, mW, Me.Height - 1750
movieDetails.Move movieHolder.Left + movieHolder.Width + 200, movieDetails.Top, Me.Width - (movieHolder.Left + movieHolder.Width + 600), Me.Height - 1750
movieDispPanel.Move 150, 300, movieDetails.Width - 300, movieDetails.Height - 650
rateThis.Move 150, movieDetails.Height - 100 - rateThis.Height
ratinG.Move 200 + rateThis.Width, rateThis.Top, movieDetails.Width - (200 + rateThis.Width + 1000)
rateVal.Move ratinG.Left + 100 + ratinG.Width, rateThis.Top
topBar.buttons(4).Width = movieHolder.Width - topBar.buttons(4).Left + 200
On Error GoTo 0
Exit Sub
Form_Resize_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure Form_Resize of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error GoTo Form_Unload_Error
Cancel = 1
End
Cancel = 0
On Error GoTo 0
Exit Sub
Form_Unload_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure Form_Unload of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub Genre_Click()
On Error GoTo Genre_Click_Error
On Error Resume Next
Dim igen
If genreIsReady Then
If Genre.Text = "------------" Then
Genre.ListIndex = lastInd
Else
lastInd = Genre.ListIndex
Dim searchI As Long
Dim matchFound As Boolean
For searchI = LBound(movieArray) To UBound(movieArray) - 1
matchFound = False
For igen = LBound(movieArray(searchI).MovieGenre) To UBound(movieArray(searchI).MovieGenre)
If Genre.Text = movieArray(searchI).MovieGenre(igen) Then matchFound = True
Next
If Genre.Text = "All" Then
matchFound = True
ElseIf Genre.Text = "Watched" And movieArray(searchI).MovieWatched = "Yes" Then
matchFound = True
ElseIf Genre.Text = "Not Watched" And movieArray(searchI).MovieWatched = "No" Then
matchFound = True
ElseIf Genre.Text = "No Category" And UBound(movieArray(searchI).MovieGenre) = 0 Then
matchFound = True
ElseIf Genre.Text = "Favourites" And movieArray(searchI).MovieIsFav = "Yes" Then
matchFound = True
End If
movieArray(searchI).MovieDisplayFlag = matchFound
Next
displayMovies
End If
End If
movieHolder.SetFocus
On Error GoTo 0
Exit Sub
Genre_Click_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure Genre_Click of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub movieDispPanel_GotFocus()
On Error GoTo movieDispPanel_GotFocus_Error
If movieHolder.Enabled = True Then movieHolder.SetFocus
HideCaret movieDispPanel.hWnd
On Error GoTo 0
Exit Sub
movieDispPanel_GotFocus_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure movieDispPanel_GotFocus of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub movieDispPanel_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
On Error GoTo movieDispPanel_MouseMove_Error
HideCaret movieDispPanel.hWnd
On Error GoTo 0
Exit Sub
movieDispPanel_MouseMove_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure movieDispPanel_MouseMove of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub movieHolder_DblClick()
On Error GoTo movieHolder_DblClick_Error
On Error Resume Next
If movieHolder.ListItems.Count > 0 Then
Dim ex As New FileSystemObject
If ex.FileExists(movieArray(Val(movieHolder.SelectedItem.SubItems(5))).MovieLocFolder & movieArray(Val(movieHolder.SelectedItem.SubItems(5))).MovieFileName) Then Shell "explorer " & Chr(34) & movieArray(Val(movieHolder.SelectedItem.SubItems(5))).MovieLocFolder & movieArray(Val(movieHolder.SelectedItem.SubItems(5))).MovieFileName & Chr(34), vbNormalFocus
End If
On Error GoTo 0
Exit Sub
movieHolder_DblClick_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure movieHolder_DblClick of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub movieHolder_ItemClick(ByVal Item As ComctlLib.ListItem)
On Error GoTo movieHolder_ItemClick_Error
displayMovieDetails Val(Item.SubItems(5))
'MsgBox movieArray(Val(Item.SubItems(5))).isMovie
On Error GoTo 0
Exit Sub
movieHolder_ItemClick_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure movieHolder_ItemClick of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub movieHolder_KeyPress(KeyAscii As Integer)
On Error GoTo movieHolder_KeyPress_Error
On Error Resume Next
If KeyAscii = 13 Then
If movieHolder.ListItems.Count > 0 Then
Dim ex As New FileSystemObject
If ex.FileExists(movieArray(Val(movieHolder.SelectedItem.SubItems(5))).MovieLocFolder & movieArray(Val(movieHolder.SelectedItem.SubItems(5))).MovieFileName) Then Shell "explorer " & Chr(34) & movieArray(Val(movieHolder.SelectedItem.SubItems(5))).MovieLocFolder & movieArray(Val(movieHolder.SelectedItem.SubItems(5))).MovieFileName & Chr(34), vbNormalFocus
End If
End If
On Error GoTo 0
Exit Sub
movieHolder_KeyPress_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure movieHolder_KeyPress of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub movieHolder_KeyUp(KeyCode As Integer, Shift As Integer)
On Error GoTo movieHolder_KeyUp_Error
If KeyCode = vbKeyDelete Then
topBar_ButtonClick topBar.buttons(8)
End If
On Error GoTo 0
Exit Sub
movieHolder_KeyUp_Error:
writeError "Error " & Err.Number & " (" & Err.Description & ") in procedure movieHolder_KeyUp of Form mainF" & vbCrLf & "HelpContext = " & Err.HelpContext & " Source = " & Err.Source
End Sub
Private Sub movieHolder_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
On Error GoTo movieHolder_MouseUp_Error