Results 1 to 4 of 4

Thread: how do I open the default Image editor???

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Location
    terra incoginta
    Posts
    17

    how do I open the default Image editor???

    I am building an image viewer and I want to add the ability to edit
    the pictures. I have added a button and in the click event I want to open the image editor. In this case paint shop pro. I would like to make it the default editor if possible so it can be used by others
    who do not have psp6.


    Thanks...........

  2. #2
    Megatron
    Guest
    ShellExecute will open a file with its default application.
    VB Code:
    1. 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
    2.  
    3. 'Usage
    4. strFileName = "MyFile.jpg"
    5. ShellExecute hwnd, "open", strFileName, "", "", 1

  3. #3
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    VB Code:
    1. 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
    2. Private Const SW_MAXIMIZE = 3
    3.  
    4. Private Sub Command1_Click()
    5.  
    6. ShellExecute Me.hwnd, vbNullString, "C:\some picture.bmp", vbNullString, vbNullString, SW_MAXIMIZE
    7.  
    8. End Sub

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Location
    terra incoginta
    Posts
    17
    Thank you .......... Thank you ............... Thank you

    That worked perfect.

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