finding controls on a window.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi, i'm using API functional calls from VB.net to find a window and send keystrokes to controls on the window, in this case a <next> button. what functions will help me send a keystore to that button if I have a handle to the window? I can use winfo to class info, text, ect. for that button, but I need to know the function I can pass these params to. i'm grateful for your help.
 
You can use the SendInput function...

http://msdn.microsoft.com/library/d...eference/keyboardinputfunctions/sendinput.asp


BDW said:
hi, i'm using API functional calls from VB.net to find a window and send
keystrokes to controls on the window, in this case a <next> button. what
functions will help me send a keystore to that button if I have a handle to
the window? I can use winfo to class info, text, ect. for that button, but I
need to know the function I can pass these params to. i'm grateful for your
help.
 
You may actually want to try doing a simple SendMessage call using the
following messages

WM_KEYDOWN
WM_KEYUP
WM_LBUTTONDOWN
WM_LBUTTONUP
WM_LBUTTONDBLCLK
WM_RBUTTONDOWN
WM_RBUTTONUP
WM_RBUTTONDBLCLK
etc....
 
Use the SendMessage API to send a BM_CLICK message to the button...

\\\
Public Const BM_CLICK As Integer = &HF5

Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer,
ByVal lParam As Integer) As Integer

Call SendMessage(intButtonHandle, BM_CLICK, 0, 0)
///

HTH,
Gary

BDW said:
hi, i'm using API functional calls from VB.net to find a window and send
keystrokes to controls on the window, in this case a <next> button. what
functions will help me send a keystore to that button if I have a handle to
the window? I can use winfo to class info, text, ect. for that button, but I
need to know the function I can pass these params to. i'm grateful for your
help.
 
Back
Top