|
本帖最后由 ganlinlao 于 2024-1-17 09:36 编辑
因为实在不明白,你的意图是什么?如果只是显示图片?为什么要用这种高难度的动作,如果是编辑图片,画图工具有多大意义?
模块1:
Public 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
窗体1:
Private Sub Command2_Click()
ShellExecute Me.hwnd, "open", "mspaint.exe", "D:\Pictures\backpaper\beautiful-environment-green-2275221.jpg", "C:\Windows\SysWOW64", 3
'最后一个参数 3,是激活并最大化 画图工具的窗口;syswow64 用来确定打开的是32位的mspaint.exe;
End Sub
|
|