Drawing on the Desktop
-
How would I go about capturing the user's desktop surface to use a
Graphics
object to draw on it? Thanks for the help in advance.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life." using Earth.Internet.WWW.CodeProject;
-
How would I go about capturing the user's desktop surface to use a
Graphics
object to draw on it? Thanks for the help in advance.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life." using Earth.Internet.WWW.CodeProject;
Perhaps this article[^] will help?
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messianic Instrumentals (with audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
How would I go about capturing the user's desktop surface to use a
Graphics
object to draw on it? Thanks for the help in advance.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life." using Earth.Internet.WWW.CodeProject;
Depending on your requirement, you have two options. Option 1 - Platform Invoke Win32 to obtain the desktop window. 1) Platform invoke a few Win32 calls from User32.dll, such as GetWindowDC() and GetDesktopWindow(). 2) Construct a graphics object based on the desktop window resource you obtained. 3) Use the constructed graphics object to draw. Option 2 - Use a transparent window to cover part or all of the desktop. 1) Create a transparent, no-border windows form. 2) Draw to that form. Best, Jun
-
Depending on your requirement, you have two options. Option 1 - Platform Invoke Win32 to obtain the desktop window. 1) Platform invoke a few Win32 calls from User32.dll, such as GetWindowDC() and GetDesktopWindow(). 2) Construct a graphics object based on the desktop window resource you obtained. 3) Use the constructed graphics object to draw. Option 2 - Use a transparent window to cover part or all of the desktop. 1) Create a transparent, no-border windows form. 2) Draw to that form. Best, Jun
Due to the fact that I want to maintain cross platform capability (in this case with Mono on platforms such as Linux and Mac OS), I think Option 2 is the better choice. Thanks.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life." using Earth.Internet.WWW.CodeProject;