请问如何点击按钮重启一个vb的应用程序。或是在vb如何用语句打开一个.exe应用程序?
如题! 问题点数:50、回复次数:4Top
1 楼helloworld84(思考中....)回复于 2005-07-28 14:22:16 得分 20
System.Diagnostics.Process.Start("Path/FileName.exe")Top
2 楼cyhweb(cyhweb)回复于 2005-07-28 14:26:47 得分 30
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_CLOSE = &H10
Private Sub Command1_Click()
Dim WindowsHwnd As Long
WindowsHwnd = FindWindow(0&, "你要关闭的程序标题")
If WindowsHwnd <> 0 Then
SendMessage WindowsHwnd, WM_CLOSE, 0, 0
End If
Shell ("你要重起的文件路径及文件名")
End Sub
Top
3 楼BeautyWolf()回复于 2005-07-28 14:28:19 得分 0
谢了呀,接分!!Top
4 楼echoxue(咱当过兵的人)回复于 2006-01-18 15:24:36 得分 0
upTop




