|
如下是在网上看到的代码。
------------------------------------------
' 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 = &H1
Private Const SWP_NOMOVE = &H2
Private Const HWND_TOPMOST = -1
Private 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函数声明--是在模块里吗,我只要把api函数声明,复制到模块里就行吗?
2.常量声明--在哪里声明?
3.在form里加的代码--是在form的什么事件里加(onload,getfocus)?
请帮帮我吧。谢谢。 |
|