CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VB >  基础类

程序中的程序

楼主ltolll(其实我不是打字员)2001-07-20 14:05:13 在 VB / 基础类 提问

我想在我的程序中打开.html文件,怎样才能调用explorer呢?最好说的详细点,谢谢!! 问题点数:10、回复次数:6Top

1 楼wbdx(碳离子)回复于 2001-07-20 14:15:15 得分 0

shell   "explorer.exe   路径   &   *.html"Top

2 楼Ninputer(装配脑袋)回复于 2001-07-20 14:17:33 得分 0

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  
   
  用这个好Top

3 楼lianghn(宁河)回复于 2001-07-20 14:30:44 得分 0

同意楼上。Top

4 楼xxlroad(土八路)回复于 2001-07-20 16:02:22 得分 0

Private   Sub   Command1_Click()  
          Dim   AddHttp   As   String  
          AddHttp   =   "D:\text.html"  
          nResult   =   Shell("start.exe   "   &   AddHttp,   vbHide)  
  End   Sub   Top

5 楼xxlroad(土八路)回复于 2001-07-20 16:03:30 得分 10

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  
   
  Private   Sub   Label1_Click()  
          ShellExecute   Me.hwnd,   "Open",   "D:\text.html",   "",   App.Path,   1  
   
  End   Sub  
  Top

6 楼Ninputer(装配脑袋)回复于 2001-07-20 16:38:34 得分 0

""最好用vbNullString代替Top

相关问题

  • 中断程序
  • 怎样在程序中reboot本程序
  • vc.net中的程序
  • 怎样在程序中结束本程序,然后重新运行本程序?
  • 中国程序员必读!
  • 在程序中更改Filter
  • 程序中建数据库
  • 怎样中断程序?
  • 程序中产生GUID?
  • 程序中调用excel!

关键词

  • shell
  • html
  • 程序
  • addhttp
  • byval
  • shellexecute
  • hwnd
  • sub
  • long

得分解答快速导航

  • 帖主:ltolll
  • xxlroad

相关链接

  • Visual Basic类图书
  • Visual Basic类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo