'***************************************************************
'After a long pain staking programming experience trying to find
'What really works and getting information from FORUMS, download
'sample pages etc,. I have finally put everything together and
'came up with the altermate solution to my hunt for a command
'that allows me to edit a pic of the common kind with no hassle.
'
'The commonly used "ShellExecute" function can be Public in a
'module or Private for localization. You choose what's better.
'***************************************************************
'
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
Sub OpenPicEditor()
'**********************************************************
'This procedure is heavily commented for your understanding
'and pleasure. Hope this clears up many queries on Me.hWnd
'and that you can keep working to get your app' under way.
'
'Email datasoftwaredevelopment@hotmai.com if you have any
'questions regarding this code and I will try and help.
'**********************************************************
'
'Declare variables for file path
'and execution.
Dim GetIt As Long
Dim sFile As String.
'
'If you have a variable that stores the path
'you simply replace "C:\Program Files\Image.bmp"
'with that variable.
sFile = "C:\Program Files\Image.bmp"
'
'Check and see if "sFile" is not empty,
'and if it's not then continue.
If Len(sFile) > 0 Then
'
'Now this section had been disputed, "Me.hWnd" was told
'to many that it was to be removed..NO..It stays.
GetIt = ShellExecute(Me.hWnd, "Open", sFile, &H0&, &H0&, 3)
End If 'End of IF Statement.
'
'Everything is working just fine and I also checked memory
'in My Computer and is working fine. No TSR's.
End Sub
'After a long pain staking programming experience trying to find
'What really works and getting information from FORUMS, download
'sample pages etc,. I have finally put everything together and
'came up with the altermate solution to my hunt for a command
'that allows me to edit a pic of the common kind with no hassle.
'
'The commonly used "ShellExecute" function can be Public in a
'module or Private for localization. You choose what's better.
'***************************************************************
'
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
Sub OpenPicEditor()
'**********************************************************
'This procedure is heavily commented for your understanding
'and pleasure. Hope this clears up many queries on Me.hWnd
'and that you can keep working to get your app' under way.
'
'Email datasoftwaredevelopment@hotmai.com if you have any
'questions regarding this code and I will try and help.
'**********************************************************
'
'Declare variables for file path
'and execution.
Dim GetIt As Long
Dim sFile As String.
'
'If you have a variable that stores the path
'you simply replace "C:\Program Files\Image.bmp"
'with that variable.
sFile = "C:\Program Files\Image.bmp"
'
'Check and see if "sFile" is not empty,
'and if it's not then continue.
If Len(sFile) > 0 Then
'
'Now this section had been disputed, "Me.hWnd" was told
'to many that it was to be removed..NO..It stays.
GetIt = ShellExecute(Me.hWnd, "Open", sFile, &H0&, &H0&, 3)
End If 'End of IF Statement.
'
'Everything is working just fine and I also checked memory
'in My Computer and is working fine. No TSR's.
End Sub