Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - GetParent

Posted in WinTask

'
' GetParent
'
' "user32" Alias "GetParent" (ByVal hwnd As Long) As Long
'

 

shell("notepad")
UseWindow("NOTEPAD.EXE|Edit|Untitled - Notepad|1",1)
SendKeys("")

hwnd=GetWindowHandle("NOTEPAD.EXE|Button|Cancel",1)
a = External("user32","GetParent", hWnd)
msgbox("The handle of the Parent of the Cancel Button is : "+Str$(a),,"GetParent")
msgbox("The 'name' of the Parent of the Cancel Button is : "+GetWindowName(a))


hwnd=GetWindowHandle("NOTEPAD.EXE|#32770|Find")
a = External("user32","GetParent", hWnd)
msgbox("The handle of the Parent of the Find dialog is : "+Str$(a),,"GetParent")
msgbox("The 'name' of the Parent of the Find dialog is : "+GetWindowName(a))

SendKeys("fxn")


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now