//--- External Function에 다음과 같이 선언하시고
Function Long SetWindowPos (Long hwnd ,Long hWndInsertAfter ,Long x ,Long y ,Long cx ,Long cy ,Long wFlags ) Library "user32"
//--- 다음과 같이 기술합니다.
Constant Long HWND_TOPMOST = -1 //맨위로 설정할때
Constant Long HWND_NOTOPMOST = -2 // 설정을 해제할때
Constant Long SWP_NOSIZE = 1
SetWindowPos (Handle(W_NAME), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE)
[이 게시물은 사랑니님에 의해 2009-08-02 15:38:47 PowerBuilder에서 이동 됨]
[출처] IT.DevInfo ∽ 힘든 IT개발자들의 즐거운 공유(ITDI.co.kr) - http://wss02.ivyro.net/onuri/bbs/board.php?bo_table=02_2&wr_id=68
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 HWND_TOP = 0
Private Const HWND_BOTTOM = 1
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Function EnabledAlwaysOnTop(hwnd As Long) As Long
EnabledAlwaysOnTop = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE)
End Function
Function DisabledAlwaysOnTop(hwnd As Long) As Long
DisabledAlwaysOnTop = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE)
End Function
'사용법은
call EnabledAlwaysOnTop(form1.hwnd)
[출처] 항상위(Allways on TOP) 표현 API|작성자 곱단이
http://blog.naver.com/seamusic00?Redirect=Log&logNo=120014901361