|
-
Aug 29th, 2001, 05:11 PM
#1
Thread Starter
Junior Member
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
-
Aug 29th, 2001, 05:40 PM
#2
Frenzied Member
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.
-
Aug 30th, 2001, 02:01 AM
#3
Fanatic Member
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)
-
Aug 30th, 2001, 06:00 PM
#4
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|