I am having a small problem with my program... Right now I have a text document with name, file location, imdb rating, ect. I had it working last night to view the text and show all the info in labels. This is still working. The problem I am having is with cmdPlay:
Private Sub cmdplay_Click()
Shell "C:\Program Files\Winamp\winamp.exe " & strlocation
End Sub
it was working last night to play each movie file... It still plays the movie file but it only plays one movie... no matter which one is selected it only plays that one movie. I have a database of 4 movies and it keeps playing the last one. The full program code is below and is as follows:
Option Explicit
Public strlocation As String
Private Sub cbotitle_Click()
Dim strmovie As String, strimdb As String, strper As String, stryear As String, strgen1 As String, strgen2 As String, strdirect As String, strlead1 As String, strlead2 As String, strlead3 As String
Open "C:\Movies\Data Base\Movie.txt" For Input As #2
Do While Not EOF(2)
Input #2, strmovie, strlocation, strimdb, strper, stryear, strgen1, strgen2, strdirect, strlead1, strlead2, strlead3
If strmovie = cbotitle.Text Then
lblimdb.Caption = "IMDb Rating:" & vbCrLf & strimdb & "/10"
lblpersonal.Caption = "Personal Rating:" & vbCrLf & strper & "/10"
lblyear.Caption = "Year:" & vbCrLf & stryear
lblgen1.Caption = "Main Genre:" & vbCrLf & strgen1
lblgen2.Caption = "Second Genre:" & vbCrLf & strgen2
lbldirect.Caption = "Director: " & strdirect
lbllead1.Caption = "Leading Actor: " & strlead1
lbllead2.Caption = "Secondary Actor: " & strlead2
lbllead3.Caption = "Supporting Actor: " & strlead3
End If
Loop
Close #2
End Sub
Private Sub cmdexit_Click()
Unload frmShow
frmMain.Visible = True
End Sub
Private Sub cmdplay_Click()
Shell "C:\Program Files\Winamp\winamp.exe " & strlocation
End Sub
Private Sub Form_Load()
Call refreshinterface
End Sub
Sub refreshinterface()
Dim strmovie As String, strimdb As String, strper As String, stryear As String, strgen1 As String, strgen2 As String, strdirect As String, strlead1 As String, strlead2 As String, strlead3 As String
cbotitle.Clear
Open "C:\Movies\Data Base\Movie.txt" For Input As #2
Do While Not EOF(2)
Input #2, strmovie, strlocation, strimdb, strper, stryear, strgen1, strgen2, strdirect, strlead1, strlead2, strlead3
cbotitle.AddItem strmovie
Loop
Close #2
End Sub