Results 1 to 2 of 2

Thread: Opening Anyfile

  1. #1

    Thread Starter
    Hyperactive Member PITBULLCJR's Avatar
    Join Date
    Nov 1999
    Location
    New York
    Posts
    408

    Post

    I know you can open exe files by putting shell(path,vbwhatever) but can you open a lets say zip file and have it open in winzip. just like the start run does for you. Or if you open up the a txt file it will automatically start up a text veiwer with the file you opened up. I hope you see what i mean. Thanks

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    232

    Post

    Use ShellExecute function:

    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

    Private Sub Command1_Click()

    Call ShellExecute(Me.hwnd, vbNullString, "d:\Archive.zip", vbNullString, vbNullString, 0&)

    End Sub

    ------------------
    smalig
    [email protected]
    http://vbcode.webhostme.com/


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