VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "VB6 例10-19  椭圆形状的窗体"
   ClientHeight    =   3300
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4485
   LinkTopic       =   "Form1"
   Picture         =   "V6bj10-19.frx":0000
   ScaleHeight     =   3300
   ScaleWidth      =   4485
   StartUpPosition =   1  '所有者中心
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
    Dim rwnd, x2, y2
    x2 = ScaleX(Me.Width, vbTwips, vbPixels)
    y2 = ScaleY(Me.Height, vbTwips, vbPixels)
    ' 建立椭圆外切的矩形区域并返回句柄，保存在rwnd变量内
    rwnd = CreateEllipticRgn(2, 25, x2 - 2, y2 - 2)
    SetWindowRgn Me.hWnd, rwnd, True            ' Me.hWnd代表主窗体
End Sub
