Joe Strazzere - All Things Quality

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


December 1, 2005 - WinTask - GetActiveWindow

Posted in WinTask

'
' GetActiveWindow
'
'Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As Long
'dim namefen$(210)
'dim numinst(210)
'dim handlefen(210)
'dim fenflag$(210)
 
'p=GetWindowsList(namefen$(),numinst(),handlefen(),fenflag$())
'msgbox(Str$(p))

'i=0

'while i'  if left$(namefen$(i),7) = "NOTEPAD" then
'     msgbox(str$(handlefen(i)),,"NOTEPAD'S HANDLE")
'  endif
'  i=i+1
'wend

'pause 3 seconds
a = External("user32","GetForegroundWindow")

msgbox(Str$(a),,"GetActiveWindow")
msgbox(GetWindowName$(a))

 


<- 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