GetForegroundWindow VB声明 
Declare Function GetForegroundWindow Lib "user32" Alias "GetForegroundWindow" () As Long 
说明 
获得前台窗口的句柄。这里的“前台窗口”是指前台应用程序的活动窗口 
返回值 
Long,前台窗口的句柄 
注解 
windows nt支持多个桌面,它们相互间是独立的。每个桌面都有自己的前台窗口