发信人: mashi-xian(老枪)
整理人: gzwsh(2002-11-05 22:59:39), 站内信件
|
【 在 lxmldd 的大作中提到:】
:win2000中,如何在VB中自动打开与特定文件关联的程序?如我想打开1个bmp的文件,让它能在其关联程序中运行。怎么办?还有,如何打开目录——象一些软件安装完成时自动弹出一个资源管理器窗口?(98的我知道:Shell "rundll32.exe url.dll,FileProtocolHandler c:\", 1,到2000中无用?)
:
:......
用下面的两个API就可以做到:
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
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
---- 别惹我生气啊,你信不信我会一枪崩了你? |
|