Click here to Skip to main content
15,887,289 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionSilent installation? Pin
charleslau285523-Nov-04 20:44
charleslau285523-Nov-04 20:44 
AnswerRe: Silent installation? Pin
Ranoush23-Nov-04 21:26
Ranoush23-Nov-04 21:26 
GeneralRe: Silent installation? Pin
Anonymous24-Nov-04 16:12
Anonymous24-Nov-04 16:12 
GeneralPrinting through Windows Service Pin
Aqeel Baig23-Nov-04 20:40
Aqeel Baig23-Nov-04 20:40 
GeneralRe: Printing through Windows Service Pin
Dave Kreskowiak24-Nov-04 1:35
mveDave Kreskowiak24-Nov-04 1:35 
GeneralClass Object Initialization Timing Issue from ActiveX Server (EXE Server) in VB Pin
Steve Pullan23-Nov-04 13:51
Steve Pullan23-Nov-04 13:51 
GeneralSending mouse click signals Pin
Rylogy23-Nov-04 12:24
Rylogy23-Nov-04 12:24 
GeneralRe: Sending mouse click signals Pin
Purple Monk23-Nov-04 22:24
Purple Monk23-Nov-04 22:24 
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 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
Const BM_CLICK = &HF5

Dim x As Long, staticx As Long, MyStr As String, y As String, control As Long

x = FindWindow("#32770", vbNullString)

'x = FindWindow(vbNullString, "Project")
' get handle to Ok button
control = FindWindowEx(x, 0, "Button", "Ok")
' click the button
SendMessage control, BM_CLICK, 0, 0
SendMessage control, BM_CLICK, 0, 0

End Sub

That's how you click a button on a msgbox - in this case "ok". I imagine it will be reasonably similar but not sure about the holding it, you could try putting the SendMessage Control in a loop.. The #32770 is the msgbox class, to send a message to a different window use the commented out bit and put the name of the window you wish to send the message to in place of "Project"

Sound!!!!!!

Hope you can work with that

"If i was king cigarettes would be free."


Generalfill combo box with table items Pin
jlawren723-Nov-04 12:19
jlawren723-Nov-04 12:19 
GeneralRe: fill combo box with table items Pin
Pablo.ar24-Nov-04 2:56
Pablo.ar24-Nov-04 2:56 
GeneralRe: fill combo box with table items Pin
jlawren724-Nov-04 4:40
jlawren724-Nov-04 4:40 
GeneralRe: fill combo box with table items Pin
ccotton33324-Nov-04 6:51
ccotton33324-Nov-04 6:51 
Generalvb.net, textbox connected with database Pin
Member 149603823-Nov-04 8:32
Member 149603823-Nov-04 8:32 
GeneralRe: vb.net, textbox connected with database Pin
jlawren723-Nov-04 12:36
jlawren723-Nov-04 12:36 
GeneralRe: vb.net, textbox connected with database Pin
Anonymous2-Dec-04 14:28
Anonymous2-Dec-04 14:28 
GeneralRe: vb.net, textbox connected with database Pin
Member 14960382-Dec-04 14:31
Member 14960382-Dec-04 14:31 
GeneralIssue with Keyboard Handling Pin
rascalot23-Nov-04 5:31
rascalot23-Nov-04 5:31 
GeneralListview Pin
Paps223-Nov-04 4:44
Paps223-Nov-04 4:44 
GeneralRe: Listview Pin
Pablo.ar24-Nov-04 3:02
Pablo.ar24-Nov-04 3:02 
GeneralProcesses Pin
cwayman23-Nov-04 3:13
cwayman23-Nov-04 3:13 
GeneralRe: Processes Pin
Carlos Cruz Espino24-Jan-05 11:41
Carlos Cruz Espino24-Jan-05 11:41 
GeneralHTTP Upload Pin
Purple Monk23-Nov-04 2:46
Purple Monk23-Nov-04 2:46 
GeneralConvert to Date Pin
nitin_ion23-Nov-04 2:37
nitin_ion23-Nov-04 2:37 
GeneralRe: Convert to Date Pin
Dave Kreskowiak23-Nov-04 3:04
mveDave Kreskowiak23-Nov-04 3:04 
GeneralRe: Convert to Date Pin
nitin_ion23-Nov-04 4:56
nitin_ion23-Nov-04 4:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.