陈茜 发表于 2013-7-2 11:36:22

如何用API函数控制让窗体总在最前面?

API函数

淡写轻描 发表于 2013-7-2 11:41:21

*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
页: [1]
查看完整版本: 如何用API函数控制让窗体总在最前面?