Can I draw a form, primarily controls?

Is it possible for me to highlight all the controls on the form ?
I have some controls ( textboxes , buttons , COM objects ) on my form, and I want to draw them by overriding any pixels previously drawn by them.
I am using Windows Forms in C# .
NOTE: the Graphics class draws under control ...

+6
source share
1 answer

Take a look at the code for this article:

Draw WinForms Controls

The author created a component that (as he describes it) looks like a piece of glass above your shape. Then your code uses this β€œbeaker”, controls, overlay form, etc.

One major limitation that will affect you is that it does not use some controls (including TextBox). These limitations (and the reasons for them) are described in the article, but the code in the article may be what you are looking for (or may serve as a starting point for your own decision).

+4
source

Source: https://habr.com/ru/post/895036/


All Articles