研发埠

标题: 如何用API函数控制让窗体总在最前面? [打印本页]

作者: 陈茜    时间: 2013-7-2 11:36
标题: 如何用API函数控制让窗体总在最前面?
API函数
作者: 淡写轻描    时间: 2013-7-2 11:41
*API函数声明Declare Function SetWindowPos Lib "user32" ( ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long注释:常量声明Private Const SWP_NOSIZE = &H1Private Const SWP_NOMOVE = &H2Private Const HWND_TOPMOST = -1Private Const HWND_NOTOPMOST = -2注释:在某个form里写:SetWindowPos me.hWnd,WND_TOPMOST,0,0,0,0, SWP_NOMOVE 注释:或下面SetWindowPos me.hWnd,WND_TOPMOST,0,0,0,0, SWP_NOSIZE




欢迎光临 研发埠 (http://bbs.yanfabu.com/) Powered by Discuz! X3.2