Hello
I'm creating Picture Viewer and every time I click 'Preview' (Start), it says Must have startup form or Sub Main()then it opens a new window (Project Properties)
Here's my code:
What do I have to do? Please, helpCode:Private Sub Form_Load() Left = (Screen.Width - Width) \ 2 Top = (Screen.Height - Height) \ 2 Combo1.Text = "All graphic files" Combo1.AddItem "All graphic files" Combo1.AddItem "All files" End Sub Private Sub Combo1_Change() If ListIndex = 0 Then File1.Pattern = ("*.bmp;*.wmf;*.jpg;*.gif") Else Fiel1.Pattern = ("*.*") End If End Sub Private Sub cmdExit_Click() End End Sub Private Sub DirSelect_Change() File1.Path = Dir1.Path File1.Pattern = ("*.bmp;*.wmf;*.jpg;*.gif") End Sub Private Sub DriveSelect_Change() Dir1.Path = Drive1.Drive End Sub Private Sub File1_Click() If Cmb1.ListIndex = 0 Then File1.Pattern = ("*.bmp;*.wmf;*.jpg;*.gif") Else File1.Pattern = ("*.*") End If If Right(File1.Path, 1) <> "\" Then filenam = File1.Path + "\" + File1.FileName Else filenam = File1.Path + File1.FileName End If Text1.Text = filenam End Sub Private Sub cmdShow_Click() MMPlayer.FileName = Text1.Text End Sub Private Sub cmdShow_Click() If Right(File1.Path, 1) <> "\" Then filenam = File1.Path + "\" + File1.FileName Else filenam = File1.Path + File1.FileName End If Picture1.Picture = LoadPicture(filenam) End Sub![]()





then it opens a new window (Project Properties) 
Reply With Quote