1). Start a Standard EXE, Form1 is added by default.
2). Change the Form1's BorderStyle property to 0-None
3). Put a command button in the center of the Form1.
4). Paste the following code in the code section of Form1
Option Explicit
Private Declare Function CreateEllipticRgn Lib "gdi32" _
(ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, _
ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" _
(ByVal hwnd As Long, ByVal hRgn As Long, _
ByVal bRedraw As Boolean) As Long
Private MoveNow As Boolean
Private StartX As Single
Private StartY As Single
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim rgnhandle As Long
Command1.Caption = "Close Me"
MoveNow = False
Me.Height = 8000
Me.Width = 8000
rgnhandle = CreateEllipticRgn(0, 0, 400, 200)
SetWindowRgn hwnd, rgnhandle, True
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y
As Single)
MoveNow = True
StartX = X
StartY = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y
As Single)