Results 1 to 4 of 4

Thread: Capturing Desktop Segment

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2001
    Location
    Puerto Rico
    Posts
    19

    Question Capturing Desktop Segment

    Well i am a Intermediatte Programmer. I Just Started Playing with Graphics and set out to make fake transparency of a form Drawing the Desktop's Piece that the form its actually over.

    I did This:

    Dim Handle as Long
    Dim SourceHdc as Long
    Dim XSrc as long
    Dim YSrc as Long

    XSrc=0
    YSrc=0

    Handle=GetDesktopWindow()
    SourceHdc=GetDc(Handle)
    BitBlt PictureBox.Hdc ,0, 0 ,me.width ,me.height ,SourceHdc ,XSrc ,YSrc ,VbSrcCopy

    This copies the desktop into a PictureBox
    how can i grab only a piece?

    I tried Changing the values in XSrc and YSrc but they seem to be in a Weird ScaleMode. I've Played Arround it without success

    Any help Will be Apreciated.

    Thanxs Thanathos

  2. #2
    Frenzied Member
    Join Date
    Aug 2001
    Posts
    1,075
    You, know, your code works for me. I changed the SrcX and Y to 50 and 50 and I grabbed the screen starting 50 pixels in and 50 pixels down.

    What results are you getting?

    Greg
    Free VB Add-In - The Reference Librarian
    Click Here for screen shot and download link.

  3. #3
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    I did the same thing once with a mario character which runs on your task bar

    It uses the same technique as the well-known sheep, it draws only the areas of the desktop which it moves to, hard to explain, but if you want I can search for it when I get back home...
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Aug 2001
    Location
    Puerto Rico
    Posts
    19
    PsychoMark:

    That would be really cool. As soon as you can please send me your code.

    Thanxs Mon

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