PDA

Click to See Complete Forum and Search --> : bitplit


BoB
Nov 25th, 1999, 02:43 AM
i think thats it but i need help on doing this thankz if anyone helps

Aaron Young
Nov 25th, 1999, 11:52 AM
BitBlt is just a Graphics Function, here's an example which creates a copy of the Desktop.

Set the Forms BorderStyle Property to None..

Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Private Const SRCCOPY = &HCC0020

Private Sub Form_DblClick()
Unload Me
End Sub

Private Sub Form_Load()
Dim lDC As Long

lDC = GetDC(0)
WindowState = vbMaximized
AutoRedraw = True
Hide
DoEvents
BitBlt hdc, 0, 0, Screen.Width / Screen.TwipsPerPixelX, Screen.Height / Screen.TwipsPerPixelY, lDC, 0, 0, SRCCOPY
ReleaseDC 0, lDC
Picture = Image
FontSize = 48
CurrentY = (Screen.Height - TextHeight("DESKTOP COPY")) / 2
CurrentX = (Screen.Width - TextWidth("DESKTOP COPY")) / 2
Print "DESKTOP COPY"
Show
End Sub


------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net