Free Games Forum
Free Games Games Forums Music Forums TV Forums

  Free Games Forum Home FORUM
HOME
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN
Rules & FAQ RULES / FAQ
REPORT SPAM

Free Games Forum: Game Technology: Visual Basic / VB:
How to grab a desktop area

 

 


Lother
Veteran


Sep 21, 2005, 1:42 PM

Post #1 of 3 (213 views)
Shortcut
How to grab a desktop area Can't Post

Make a timer and call it Timer1

Code
Private Sub Timer1_Timer () 
DoEvents
Grab Pixels 50, 50
End Sub

Private Sub Grab Pixels (ByVal area_wid As Long, ByVal _
Area_hgt As Long)
Dim Desktop_rect As RECT
Dim Desktop_win As long
Dim desktop_dc As long
Dim desktop_wid As Long
Dim Desktop_hgt As long
Desktop win = GetDesktopWindow ()
desktop_dc = GetDC (Desktop_win)
GetWindowRect desktop_rect.Right
desktop_hgt as Long
Width = ScaleX(area_wid, vbPixels, vbTwips) + Width - _
ScaleWidth
Height = ScaleY )area_hgt, vbPixels, vbTwips) + Height - _
Scale Height
StretchBlt _
hdc, 0, 0, area_wid, are hgt,_
desktop_dc,_
(desktop_wid - area_wid) \2. _
(desktop_hgt - area_hgt) \ 2, _
area_wid, area_hgt, SRCCOPY
Picture = Image

ReleaseDC desktop_win, desktop_dc
end Sub


I typed all that up, no copy and paste.

Tell me if I missed anything.



No God, no peace.
Know God, know peace.

Don't let them scare you
Cool



Crazy Eye
Enthusiast

Sep 21, 2005, 2:10 PM

Post #2 of 3 (208 views)
Shortcut
Re: [Lother] How to grab a desktop area [In reply to] Can't Post

ok, what exactly does this do, it seems to me, like it just gets the size and stuff, but i could be wrong!


darkdemon
Enthusiast


Sep 26, 2005, 2:49 AM

Post #3 of 3 (193 views)
Shortcut
Re: [Crazy Eye] How to grab a desktop area [In reply to] Can't Post

That didn't do anything.


U r reading a signature.
Free game hacks!

 
 
 


Search for (options) Web Design by Web Ideas - Page loaded in: 0.12 s on (CGI/1.1)