guangji
所属分类:其他
开发工具:Visual Basic
文件大小:10KB
下载次数:4
上传日期:2006-08-19 10:50:12
上 传 者:
286945657
说明: 有源码事例,还有说明.一看就明白,
一,把"HGB.dll"和"hgbguanligongcheng.dll"复制到系统文件夹"\WINDOWS\system32"下.
二,新建一VB标准EXE,在"工程\引用"下点击浏览把"\WINDOWS\system32"下的"hgbguanligongcheng.dll"
引用进来.
三,在窗体里声明一个对象变量yy
Dim yy As New hgbguanlimokuai
再在任一事件下引用YY里的函数过程
i = yy.chongqi() 本过程执行重启动计算机,无返回值
ii=yy.guanji() 本过程执行关闭计算机,无返回值
iii=yyy.huoquan() 本过程执行获得计算机管理权,成功返回1,失败返回0
注意: 生成exe文件在别的机上运行时要把两个DLL文件复制到系统文件夹"\WINDOWS\system32"下,.因为exe
文件在运行时会用到那两个DLL.
解释:
"hgbguanligongcheng.dll"文件里面有"hgbguanlimokuai"模块
"hgbguanlimokuai"模块里面有三个函数过程chongqi(),guanji(),huoquan()
我们声明YY为"hgbguanlimokuai"模块就等于在工程里加入了一个模块当然就能
在任何其他事件引用模块里的函数过程.
(a source examples, there are shows. See at a, a, "HGB.dll" and "hgbguanligongcheng.dll" copied to the System folder "\ WINDOWS \ system32". 2, a new standard EXE VB. "works \ quote" Click here "\ WINDOWS \ system32" under the "hgbg uanligongcheng.dll "quote come. 3. Form Lane in a statement object variables yy Dim yy As New hgbguanlimokuai again In any event occurred YY Lane function yy.chongqi process i = () implementation of the process of calculating restart machine, no return value yy.guanji ii = () implementation of the process of closing the computer, No value is returned yyy.huoquan iii = () is the process of the implementation of the Computer Management, successfully return to a failure to 0 Note : exe file generated in ot)
文件列表:
VB编写关机程序\使用方法.txt (969, 2006-08-16)
VB编写关机程序\HGB.dll (4096, 2004-09-20)
VB编写关机程序\hgbguanligongcheng.dll (24576, 2006-08-16)
VB编写关机程序\事例\工程1.vbw (49, 2006-08-16)
VB编写关机程序\事例\Form1.frm (1507, 2006-08-16)
VB编写关机程序\事例\工程1.vbp (745, 2006-08-16)
VB编写关机程序\事例 (0, 2006-08-16)
VB编写关机程序\事例.exe (20480, 2006-08-16)
VB编写关机程序 (0, 2006-08-16)
近期下载者:
相关文件:
收藏者: