-
July 29th, 2006, 11:16 PM
#1
how can i get the handle of a window's textbox
i'd like to get the handle of textbox. how can i do that?
thanks
-
July 29th, 2006, 11:31 PM
#2
Re: how can i get the handle of a window's textbox
Where is the textbox? In another program? What kind of program is it?
Is it a DirectX game?
-
July 29th, 2006, 11:37 PM
#3
Re: how can i get the handle of a window's textbox
Originally Posted by dglienna
Where is the textbox? In another program? What kind of program is it?
Is it a DirectX game?
it's textbox of another window
-
July 30th, 2006, 01:11 AM
#4
Re: how can i get the handle of a window's textbox
Originally Posted by HopeZ
it's textbox of another window
try this code Add A timer and set interval property to 1 and drop a Label too named Label1
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
-
July 30th, 2006, 05:27 AM
#5
Re: how can i get the handle of a window's textbox
Originally Posted by HopeZ
it's textbox of another window
You can either use FindWindowEx API or the EnumChildWindows API. Take a look at www.allapi.net for the examples on these APIs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|