Results 1 to 3 of 3

Thread: [RESOLVED] ERROR: Must have startup form or Sub Main()

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2007
    Location
    Slovenia
    Posts
    131

    Resolved [RESOLVED] ERROR: Must have startup form or Sub Main()

    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:
    Code:
    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
    What do I have to do? Please, help
    Attached Images Attached Images  
    Last edited by Miha2c30; Jul 13th, 2007 at 03:51 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width