by amcanadian » Tue Jan 02, 2007 10:08 pm
Hackwood i tried ur solution it doesnt work, i closed the window "paltalk closing" using this Visual Basic program of a simple Form with a button, but it closes automaticaly the buddylist program, do u think i can modify somthing in the program to avoid closing buddylist window ?
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 winHwnd As Long
Dim RetVal As Long
winHwnd = FindWindow(vbNullString, "Paltalk Closing")
If winHwnd <> 0 Then
PostMessage winHwnd, WM_CLOSE, 0&, 0&
Else
MsgBox "The Paltalk Closing Window is not open."
End If
End Sub
Thank u