您的位置:逆风者 VB 正文
原作者:www.upwinder.com 添加时间:2007-09-02 原文发表:2007-08-31 人气:9 来源:未知

代码如下:
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
逆风者
Const SW_SHOW = 5

Private Sub Command1_Click()
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
Text1.Text = CommonDialog1.FileName
ShellExecute Me.hwnd, "open", CommonDialog1.FileName, "", "", SW_SHOW
'方法二
' Str1 = "start " & CommonDialog1.FileName
' Shell Str1
End If
End Sub

相关文章

一个自动更换墙纸的小软件
在VB中如何得到网络中某一台电脑(电脑名)的
桌面屏幕翻转
用VB计算1 1=2
在桌面上建立一个 Internet 快捷键
用VB尝试新的界面风格
用VB读写注册表实例
自动更新工作站的应用程序
VB实现按钮浮动效果
VB6制作Win98风格的工具栏
PING一个IP地址(向它发送一个数据包并等待
开启文件属性窗口
Viusal Basic程序员的.NET泛型编程
VB应用程序的启动与退出设计
动态改变屏幕设置
FSO对象模型在VB中的应用
VB 从零开始编外挂(十二)
用VB编写简单的时钟程序(有时、分、秒针转
移动文件到回收站
用VB创建Windows快捷方式

相关评论


本文章所属分类:首页 VB

  热门关键字: