2025年3月22日 星期六 甲辰(龙)年 月廿一 设为首页 加入收藏
rss
您当前的位置:首页 > 计算机 > 编程开发 > VB

VB编程:用Shell函数打开记事本

时间:05-26来源:作者:点击数:43

VB编程:用Shell函数打开记事本

  • Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
  • Dim strtemp As String * 60
  • Private Sub Command1_Click()
  • Dim L, S
  • Dim paths As String
  • L = GetSystemDirectory(strtemp, Len(strtemp))
  • paths = Left(strtemp, L) & "\NOTEPAD.EXE"
  • S = Shell(paths, vbNormalFocus)
  • End Sub

 

方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门