home *** CD-ROM | disk | FTP | other *** search
- DefInt A-Z
-
- Declare Function BitBlt Lib "Gdi" (ByVal destHdc, ByVal X, ByVal Y, ByVal w, ByVal h, ByVal srcHdc, ByVal srcX, ByVal srcY, ByVal Rop As Long)
-
- Const SRCAND = &H8800C6
- Const SRCINVERT = &H660046
-
- Sub Form_Paint ()
-
- ' ** Display something random text on the form **
- '
- Cls
- CurrentY = Command1.Top + Command1.Height
- Rows = (ScaleHeight - CurrentY) \ TextHeight(" ")
-
- For Y = 1 To Rows
- Print "DESTINATION DESTINATION"
- Next Y
-
- End Sub
-
- Sub Form_Resize ()
- Refresh
- End Sub
-
- Sub Command1_Click ()
-
- Refresh
-
- ' ** Display Bitmap with center of it being transparent
- ' Logic is: (Dest AND Mask) XOR Image
- '
- YDest = Command1.Top + Command1.Height
-
- R = BitBlt(Hdc, 0, YDest, Pic_Mask.Width, Pic_Mask.Height, Pic_Mask.Hdc, 0, 0, SRCAND)
- R = BitBlt(Hdc, 0, YDest, Pic_Image.Width, Pic_Image.Height, Pic_Image.Hdc, 0, 0, SRCINVERT)
-
- XDest = Pic_Image.Width + 1
- R = BitBlt(Hdc, XDest, YDest, Pic_Mask.Width, Pic_Mask.Height, Pic_Mask.Hdc, 0, 0, SRCAND)
- R = BitBlt(Hdc, XDest, YDest, Pic_Image.Width, Pic_Image.Height, Pic_Image.Hdc, 0, 0, SRCINVERT)
-
- End Sub
-
- Sub Command2_Click ()
-
- Refresh
-
- End Sub
-
- Sub Form_Load ()
-
- Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
- End Sub
-
-