您的位置:程序门 -> vb -> 基础类



shell相对路径怎么表示


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


shell相对路径怎么表示[已结贴,结贴人:zth1202]
发表于:2007-06-25 12:50:58 楼主
比如我想打开ie
但是我不知道系统在那个盘符下面
发表于:2007-06-25 13:06:301楼 得分:0
系统环境中有系统路径,应该可以访问那个路径,但不知道具体代码,然后在shell中加上就是了。
发表于:2007-06-25 13:08:242楼 得分:0
我就是要代码呀
发表于:2007-06-25 13:09:033楼 得分:0
读注册表项出来就可以了!
发表于:2007-06-25 13:09:574楼 得分:0
代码有没有呀
发表于:2007-06-26 10:22:025楼 得分:0
求救
发表于:2007-06-26 11:14:336楼 得分:0
public   const   hkey_classes_root   =   &h80000000

public   const   hkey_current_user   =   &h80000001

public   const   hkey_local_machine   =   &h80000002

public   const   hkey_users   =   &h80000003

public   const   hkey_performance_data   =   &h80000004

public   const   hkey_current_config   =   &h80000005

public   const   hkey_dyn_data   =   &h80000006

public   const   reg_none   =   0                                               '   no   value   type

public   const   reg_sz   =   1                                                   '   unicode   nul   terminated   string

public   const   reg_expand_sz   =   2                                     '   unicode   nul   terminated   string

public   const   reg_binary   =   3                                           '   free   form   binary

public   const   reg_dword   =   4                                             '   32-bit   number

public   const   reg_dword_big_endian   =   5                       '   32-bit   number

public   const   reg_multi_sz   =   7                                       '   multiple   unicode   strings

public   declare   function   regopenkey   lib   "advapi32.dll "   alias   "regopenkeya "   (byval   hkey   as   long,   byval   lpsubkey   as   string,   phkresult   as   long)   as   long
public   declare   function   regqueryvalueex   lib   "advapi32.dll "   alias   "regqueryvalueexa "   (byval   hkey   as   long,   byval   lpvaluename   as   string,   byval   lpreserved   as   long,   lptype   as   long,   lpdata   as   any,   lpcbdata   as   long)   as   long
public   declare   function   regclosekey   lib   "advapi32.dll "   (byval   hkey   as   long)   as   long
    sub   main()
          dim   hkey   as   long
          dim   ie_path   as   string
          ie_path   =   space(255)
          ret   =   regopenkey(hkey_classes_root,   "applications\iexplore.exe\shell\open\command ",   hkey)
          ret   =   regqueryvalueex(hkey,   " ",   0,   reg_sz,   byval   ie_path,   len(ie_path))
          regclosekey   hkey
          msgbox   ie_path
    end   sub
发表于:2007-06-26 11:53:377楼 得分:0
直接用shellEXECute执行about:blank
发表于:2007-06-26 12:03:088楼 得分:15
vb内置的好,   shell   "cmd   /c   start   url "   ,vbhide
把url换成你的网址就行了
发表于:2007-06-26 16:17:119楼 得分:5
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

'打开outlook
shellEXECute   me.hwnd,   "open ",   "mailto:aaa@163.com?subject=帮助 ",   " ",   " ",   vbnormalfocus
'打开ie
shellEXECute   me.hwnd,   "open ",   "www.google.com ",   " ",   " ",   vbnormalfocus


快速检索

最新资讯
热门点击