-
i've been messing around with some graphics and stuff, painting pixels onto forms... now my weird brain's decided i want to paint pixels straight onto the screen, without putting a form up...
i can do it fine copying the contents of the screen to a form.. but i want to paint directly onto the screen, so that i can still click icons and such around it...
i've tried getting the desktop window's dc, and using that as an argument for the ellipse function (which works fine on a form) but it just doesn't paint anything..
a friend who programs in delphi's told me i need to create a "canvas" first, but i'm lost...
thanks in advance for any hints or help
-
You can use following code (copy functions from the API):
-
Dim DC as Long
DC = GetWindowDC( GetDesktopWindow )
-
Hope this helps
------------------
[email protected]
...
Every program can be reduced to one instruction which doesn't work.
-
mmmm thanks for the answer but i already know how to get the dc and stuff =\
i still haven't figured it out.. i went away and tried some more.... i can paint anything and everything onto stupid forms but i wanna paint right on the screen....
thanks anyway
-
Yes, if you have the DC stored youu can use functions like SetPixel (API) to draw directly on the 'desktop'. (this DC is like the screen directly, not sure if always)
------------------
[email protected]
...
Every program can be reduced to one instruction which doesn't work.
-
i've got some code that does exactly what your are looking for :)
mail me and if u want it
------------------
cintel rules :p
www.cintelsoftware.co.uk