|
-
Nov 25th, 2001, 12:28 PM
#1
Thread Starter
Junior Member
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...........
-
Nov 25th, 2001, 12:33 PM
#2
ShellExecute will open a file with its default application.
VB Code:
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
'Usage
strFileName = "MyFile.jpg"
ShellExecute hwnd, "open", strFileName, "", "", 1
-
Nov 25th, 2001, 12:33 PM
#3
PowerPoster
VB Code:
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 Const SW_MAXIMIZE = 3
Private Sub Command1_Click()
ShellExecute Me.hwnd, vbNullString, "C:\some picture.bmp", vbNullString, vbNullString, SW_MAXIMIZE
End Sub
-
Nov 25th, 2001, 01:40 PM
#4
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|