首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

SetForegroundWindow可以用来激活窗体用吗?该如何处理

2012-01-07 
SetForegroundWindow可以用来激活窗体用吗?如题[解决办法]WindowFromPointThe WindowFromPoint function r

SetForegroundWindow可以用来激活窗体用吗?
如题

[解决办法]
WindowFromPoint
The WindowFromPoint function retrieves a handle to the window that contains the specified point. 

HWND WindowFromPoint(
POINT Point // structure with point
);
 
Parameters
Point 
Specifies aPOINT structure that defines the point to be checked. 
Return Values
The return value is a handle to the window that contains the point. If no window exists at the given point, the return value is NULL. If the point is over a static text control, the return value is a handle to the window under the static text control. 

Remarks
The WindowFromPoint function does not retrieve a handle to a hidden or disabled window, even if the point is within the window. An application should use the ChildWindowFromPoint function for a nonrestrictive search. 

QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
Import Library: Use user32.lib.

See Also
Windows Overview, Window Functions, ChildWindowFromPoint,POINT,WindowFromDC 

 

[解决办法]

VB code
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long 

热点排行