Private Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Sub Command1_Click()
End
End Sub
Private Sub Form_Click()
Text1.Text = "你好!"
End Sub
Private Sub Form_Load()
Dim hBitmap
Me.AutoRedraw = True
'Me.BorderStyle = 0
Command1.Caption = "退出"
hBitmap = CreateCompatibleBitmap(Me.hdc, 0, 0)
SelectObject Me.hdc, hBitmap
Me.Refresh
End Sub
Private Sub Command1_Click()
Dim i, l As Long
Me.ScaleMode = 3
i = CreateRectRgn(Command1.Left, Command1.Top, Command1.Left + Command1.Width, Command1.Top + Command1.Height)
l = SetWindowRgn(Me.hwnd, i, True)
Me.Refresh