This is the code to a program i made to close cam windows faster for green nick users sense people like me who are green can have unlimited cam windows this will close it faster. if you use this give me credit some place or be shamed of how lame you are.
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessageLong 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 mywindowclass As Long
Dim X As Long
mywindowclass = FindWindow("my window class", vbNullString)
X = FindWindow("#32770", vbNullString)
Call SendMessageLong(X, WM_CLOSE, 0&, 0&)
If X = 0 Then
MsgBox "No! Cam Windows Open or This is a Older or Newer Version of Paltalk!", vbCritical, "Error!"
Exit Sub
End If
End Sub
place this in the Command1 button and compile it thats all.