这个问题,您一定无法想像有多容易,您可以产生任何形状的 Form,但必须借助 CreateEllipticRgn 及 SetWindowRgn 二个 API ,例如:
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 Sub Form_Load() Dim lReturn As Long Me.Show lReturn = SetWindowRgn(hWnd, CreateEllipticRgn(10, 10, 340, 150), True) End Sub
执行结果图片
CreateEllipticRgn 之四个参数说明如下: X1:椭圆中心点之X轴位置,但以 Form 的实№边界为限。 Y1:椭圆中心点之Y轴位置,但以 Form 的实№边界为限。 X2:椭圆长边的长度 Y2:椭圆短边的长度的  
|