Results 1 to 2 of 2

Thread: bitplit

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    204

    Post

    i think thats it but i need help on doing this thankz if anyone helps

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    BitBlt is just a Graphics Function, here's an example which creates a copy of the Desktop.

    Set the Forms BorderStyle Property to None..
    Code:
    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
    [email protected]
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width