Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 22038

clarification about active windows

$
0
0
I have seen this code below

Dim MyStr As String, theHwnd As Long
'Create a buffer
theHwnd = GetForegroundWindow()
MyStr = String(GetWindowTextLength(theHwnd) + 1, Chr$(0))
'Get the window's text
GetWindowText theHwnd, MyStr, Len(MyStr)
Me.Caption = MyStr



I would like to ask if theHwnd is the other application's window or this application that executes this code?

Viewing all articles
Browse latest Browse all 22038

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>