2009-07-11, 09:18 AM
|
#3 (permalink)
|
註冊會員
|
引用:
作者: mini
可以使用windows視窗定位API函式
Public Const hWnd_NOTOPMOST = -2 '取消置頂
Public Const hWnd_TOPMOST = -1 '將視窗至於桌面視窗最頂部
Public Const hWnd_BOTTOM = 1 '最下面
Public Const SWP_HIDEWINDOW = &H80 '隱藏視窗
Public Const SWP_NOSIZE = &H1 '保持窗口大小
Public Const SWP_NOMOVE = &H2 '保持窗口位置
Public 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
hWnd=Me.hWnd
'先置頂
SetWindowPos hWnd, hWnd_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
'再取消
SetWindowPos hWnd, hWnd_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
|
感謝大大,OK了,萬分感激。
|
|
|
送花文章: 25,
收花文章: 108 篇, 收花: 261 次
|