两个vb问题
来源:百度知道 编辑:UC知道 时间:2024/06/02 00:34:05
1、如何在vb中加入代码,使系统重新启动/关闭/注销
2、为什么vb窗口中只要加入了菜单,无论是否显示菜单,窗体的边框设为无后,边框还有?
2、为什么vb窗口中只要加入了菜单,无论是否显示菜单,窗体的边框设为无后,边框还有?
Shell ("shutdown -t 0 -s") 关机
Shell ("shutdown -t 0 -r") 重新启动
这个你可以到CMD中用 shutdown /? 去查
还有就是可以 用API 函数
下面一个吗
我也说不好
你这两项都需要使用到API代码
关机。强制关机,的代码(api)要的话发邮件到:bornnow@163.com
必用api实现。也可以用shell
调用shutdown
Open App.Path & "\CONAN.bat" For Output As #1
Print #1 ,"@Shutdown -s -f -t 1"
Close #1
Shell App.Path & "\CONAN.bat"
用cmd.exe