VB怎么添加ShellExecute函数声明
2个回答
2013-08-01
展开全部
在模块声明段加: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
推荐于2018-03-30
展开全部
1)在菜单"外接程序"下选"外接程序管理器",在'外接程序管理器'窗口选中
"VB 6 API VIEWER".
对加载行为项选 加载/卸载
然后确定,再在在菜单"外接程序"下选"API 浏览器",出现"API 浏览器"窗口,打开文件菜单选加载文本文件,选WIN32API.TXT.
以下就是由"API 浏览器"中对ShellExecute函数声明复制的代码:
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
2)自动链接到IE 浏览器
Private Sub Command1_Click()
Dim open_iE
open_iE = Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE", 1)
End Sub
"VB 6 API VIEWER".
对加载行为项选 加载/卸载
然后确定,再在在菜单"外接程序"下选"API 浏览器",出现"API 浏览器"窗口,打开文件菜单选加载文本文件,选WIN32API.TXT.
以下就是由"API 浏览器"中对ShellExecute函数声明复制的代码:
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
2)自动链接到IE 浏览器
Private Sub Command1_Click()
Dim open_iE
open_iE = Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE", 1)
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询