-
GetDesktopDC?
Hi!
I want tot know if there is any function to get
the desktop DC, and load it before my form goes up?
My target is to make a picture with a white back, and
then use SetPixel and GetPixel to make the white part
transparent.
understand me?
If there's other way of making it, tell me...
Thank you,
Arie.
-
Code:
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Dim deskWnd As Long
Dim deskDC As Long
deskWnd = GetDesktopWindow()
deskDC = GetDC(deskWnd)
And Sastraxi is right, use BitBlt instead of Get- and SetPixel, it's much faster...
-
err use GetWindowDC not GetDC...
-
GetDC always worked fine for me...
-
GetwindowDC returns the dc to the client area of a window while GetDC returns the DC including the non-client area. You can also use GetDC to return the screen device context by passing a null:
ScreenDC=GetDC(0)
Also, you have to use ReleaseDC to free up the resources after you.
-
Seems like noone cracked your numbers yet huh? ;)
-
yeah, that's odd, it's not encrypted or encoded in any way
-
I posted something in Chit-Chat!
Is it your VB serial number??? (or C, Java, Interdev, Studio, ???)