I want to create a app that lets you draw on screen like Epic Pen. I searched on google on how to do it but all I found was only how to draw static shapes (rectangles etc.) on the screen, not brushstrokes like in MSPaint. I thinked of making the form transparent by using TransparencyKey but it just lets clicks through it.. Is there any way for me to do this, without taking a screenshot and drawing on it? I want users to be able to switch between pen mode (draw on screen) and cursor mode (normal clicking).
Asked
Active
Viewed 129 times
1
-
Create a Layered Window and update it with 32-bit ARGB Bitmap whose alpha channel is all set to 1. Subsequently, draw your content on this bitmap. – jtxkopt Nov 06 '22 at 14:05
-
Do you want to draw onto the screen or onto your form? – TaW Nov 06 '22 at 14:55
-
@TaW I want to draw on the screen, I just said I can use a transparent form to achieve it. You can download and install epic pen to understand what I mean. – user123 Nov 06 '22 at 16:05
-
The keyword for your question is Layered Window. – jtxkopt Nov 06 '22 at 17:36
-
The clicktrough depends on which color you use for the tpkey. see [here](https://stackoverflow.com/questions/35217890/problems-with-opacity/35218643#35218643) – TaW Nov 06 '22 at 18:10
-
@jtxkopt can you give me a code example? I Don't know much about layered windows – user123 Nov 10 '22 at 17:41