Hallöchen..
versuch mal dieses hier...
Ist aus der AktiveVB und demonstriert ein ovales Formular
Zu weiteren Info´s www.activeVB.de
Viel Spass
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 Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () _
As Long
Private Declare Function SendMessage Lib "user32"Alias _
"SendMessageA" (ByVal hwnd As Long, ByVal wMsg As _
Long, ByVal wParam As Long, lParam As Any) As Long
Private Const HTCAPTION = 2
Private Const WM_NCLBUTTONDOWN = &HA1
Private Sub Form_Load()
Me.Picture = LoadPicture(App.Path & "\Back.gif")
Call CreateReg
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _
x As Single, y As Single)
If y / Screen.TwipsPerPixelY < 25 Then
Call ReleaseCapture
Call SendMessage(Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
End Sub
Private Sub CreateReg()
Dim x&, y&, dx&, dy&, Result&
With Me
dx = .Width / Screen.TwipsPerPixelX
dy = .Height / Screen.TwipsPerPixelY
Result = CreateEllipticRgn(y + 1, x + 1, dx - 1, dy - 1)
Call SetWindowRgn(.hwnd, Result, 1&)
End With
End Sub