关闭进程的——
这个vb的不知道怎么写,才能变第三方?
- Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
- Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
-
- Const WM_CLOSE = &H10
- Private Sub Form_Load()
- Dim hwnd As Long
- hwnd = FindWindow(vbNullString, "vbs") '查找窗体标题
- If hwnd <> 0 Then
- PostMessage hwnd, WM_CLOSE, 0&, 0&
- End If
- hwnd = FindWindow(vbNullString, "6122软件") '查找窗体标题
- If hwnd <> 0 Then
- PostMessage hwnd, WM_CLOSE, 0&, 0&
- End If
- End Sub
复制代码
[ 本帖最后由 shuaige100 于 2010-7-6 23:04 编辑 ] |