'需一个Image Control , 一个Command1
Option Explicit
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Private hBitmap As Long
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
'事先请设form的BorderStyle = 0 没有框线
Me.AutoRedraw = True
Set Image1.Picture = LoadPicture("e:\bubbles.gif") '请自行找一个背景透明的图
hBitmap = CreateCompatibleBitmap(Me.hdc, 0, 0)
SelectObject Me.hdc, hBitmap
Me.Refresh
End Sub
Private Sub Form_Unload(Cancel As Integer)
DeleteObject hBitmap
End Sub
|