problem locking the mic using code

You can talk about VB programming here

problem locking the mic using code

Postby method » Thu Nov 29, 2007 7:47 am


hi all. I used to use this code to lock the mic but for some reason it is not working.
probably I need to change 33239 but i don't know how to get it !! I want this to work for paltalk 9.2. Hope some one help me.Thanks





Code: Select all
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, ByVal lParam As Long) As Long

 Const WM_COMMAND = &H111



Private Sub Command17_Click()
Dim window As Long

window = FindWindow("DlgGroupChat Window Class", vbNullString)
PostMessage window, WM_COMMAND, 33239, 0
End Sub
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: problem locking the mic using code

Postby Chike » Thu Nov 29, 2007 10:54 am

Why not search the room window's menu for commands number?
I believe the text haven't changed with versions, and if it did you can match the text against several different strings, or known strings for different versions.
Image
Chike
imFiles Master
imFiles Master
 
Posts: 583
Joined: Sun May 13, 2007 6:20 pm


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests