Posted: Tue Sep 03, 2002 10:49 am
Restored from previous forum. Originally posted by PB.
If I run the following code and then click on the Desktop, why are
both values different? I thought they should be the same?
Basically, I need to set the focus to the Desktop in my app, but it's
hard to know what the handle of the Desktop is because using the
GetDesktopWindow API doesn't seem to actually be the Desktop...?
UPDATE: Never mind, I worked out that I can get the Desktop handle
by using: dt=FindWindow_(0,"Program Manager").
PB - Registered PureBasic Coder
If I run the following code and then click on the Desktop, why are
both values different? I thought they should be the same?
Code: Select all
Repeat
Sleep_(500)
Debug "Foreground = "+Str(GetForegroundWindow_())
Debug "Fake Desktop = "+Str(GetDesktopWindow_())
Debug "Real Desktop = "+Str(FindWindow_(0,"Program Manager"))
Debug ""
ForEver
hard to know what the handle of the Desktop is because using the
GetDesktopWindow API doesn't seem to actually be the Desktop...?
UPDATE: Never mind, I worked out that I can get the Desktop handle
by using: dt=FindWindow_(0,"Program Manager").
PB - Registered PureBasic Coder