各位兄弟姐妹帮我看看代码问题出在哪
Public Class Form1
Private Declare Function CreateRectRgn Lib "gdi32" _
( _
ByVal X1 As Long, ByVal Y1 As Long, _
ByVal X2 As Long, ByVal Y2 As Long _
) As Long
Public Declare Function CreateEllipticRgn Lib "gdi32" Alias "CreateEllipticRgn" _
(ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Public Declare Function SetWindowRgn Lib "user32" Alias "SetWindowRgn" _
(ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim hRgnC As Long
Dim r As Long
hRgnC = CreateEllipticRgn(5, 5, 300, 300)
'创建椭圆形区域
r = SetWindowRgn(Me.Handle.ToInt32, hRgnC, True)
'设置窗口为椭圆形
End Sub
End Class