|
-
Dec 10th, 2001, 05:50 AM
#1
-
Dec 10th, 2001, 08:35 AM
#2
Good Ol' Platypus
2)
VB Code:
W = Screen.Width / Screen.TwipsPerPixelX
H = Screen.Height / Screen.TwipsPerPixelY
1)
VB Code:
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Function ScreenCapture() As Long
ScreenCapture = GetDC(GetDesktopWindow)
End Function
If you don't understand something, just tell me.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Dec 12th, 2001, 11:19 PM
#3
Thanks a lot, i understand it
-
Dec 12th, 2001, 11:23 PM
#4
Sorry,
Yeah, i just though:
Is it then possible to change screen size by changing the Screen.Width and .height variables?
-
Dec 13th, 2001, 03:28 AM
#5
Fanatic Member
Nope, you have to use the ChangeDisplaySettings API...
Teaudirenopossum.Musasapientumfixaestinaure.
(I can't hear you. There's a banana in my ear)
-
Dec 14th, 2001, 04:48 PM
#6
Addicted Member
Hey SasTraxi...
Can you explain me what it is doing and how to test it?
When I tested this I am getting some values for that function.
8126
1918
17666
1914
1906
And they are repeating when I keep pressing Command1.
Regards.
-
Dec 14th, 2001, 11:00 PM
#7
Now, how do you use that with:
picture1.picture = (Background)??
I tried but me and my low intellect failed.
-
Dec 14th, 2001, 11:04 PM
#8
Good Ol' Platypus
Whoops! Left out a doosey- BitBlt. That number is just the location of the desktop graphic - you need to retrieve it.
Declare the API BitBlt:
VB Code:
Function ScreenCapture(Pic As PictureBox) As Long
ScreenCapture = GetDC(GetDesktopWindow)
BitBlt Pic.hDC, 0, 0, Screen.Width / Screen.TwipsPerPixelX, Screen.Height / Screen.TwipsPerPixelY, ScreenCapture, 0, 0, vbSrcCopy
End Function
If you want to know more of BitBlt (it's very powerful!) you can see my tutorial on it...
http://vbden.tripod.com/articles/invmask.htm
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
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
|