# Re: 他已关门了,怎办?

Posted by 土狗 on September 29, 1999 at 10:05:27:

In Reply to: 他已关门了,怎办? posted by Tim on September 29, 1999 at 08:39:06:

以下的API及程式码应该都用得上
你自己去组合一下
做个timer跑跑看

Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long

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

Type POINTAPI
x As Long
y As Long
End Type

----------------------------------------

Call SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAG)
Me.Move Xp, Yp
-------------------------------------------

hRegion = CreatePolygonRgn(PLoc(0), nxy, 1)
Call SetWindowRgn(FORM1.hwnd, hRegion, True)

Follow Ups: