i'd like to get the handle of textbox. how can i do that?
thanks
Printable View
i'd like to get the handle of textbox. how can i do that?
thanks
Where is the textbox? In another program? What kind of program is it?
Is it a DirectX game?
Quote:
Originally Posted by dglienna
it's textbox of another window
try this code Add A timer and set interval property to 1 and drop a Label too named Label1Quote:
Originally Posted by HopeZ
and move your mouse around the screen to know the Hwnd
Code:Option Explicit
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Dim MousePNT As POINTAPI
Dim X As Integer, Y As Integer, curWindow As Long
Private Sub Form_Load()
Label1.Caption = "Hwnd = "
End Sub
Private Sub Timer1_Timer()
Call GetCursorPos(MousePNT)
X = MousePNT.X
Y = MousePNT.Y
curWindow = WindowFromPoint(X, Y)
Me.Caption = X & "/" & Y
Label1.Caption = curWindow
End Sub
You can either use FindWindowEx API or the EnumChildWindows API. Take a look at www.allapi.net for the examples on these APIs.Quote:
Originally Posted by HopeZ