Make my control invisible
How to make my control to handle All the events, but still that it wouldnt be painted? Overriding OnPaint and OnPaintbackground and leaving it empty wouldnt do the thing I guess...
How to make my control to handle All the events, but still that it wouldnt be painted? Overriding OnPaint and OnPaintbackground and leaving it empty wouldnt do the thing I guess...
In case you don't know, some controls dont expose the doublebufferd property. You must inherit the control
and override the DoubleBuffered property in order to enable double buffering of a button for instance.
Hi, bucz,
Based on my understanding, you want to make the controls invisible but all events work, don't you?
In my point of view, you will have to make the controls transparent not invisible, or the Paint event will never get triggered.
There comes a problem, some controls, such as TextBox, RichTextBox, Panels, won't get transparent even you change their BackColor to transparent, because each of them is just a wrapper of the current win32 control, and you will find that although you can override the OnPaint and OnPaintBackground, you cannot change anything there. The solution is that you will have to deal with the Win32 API.
To change the controls transparent,please check the following urls,
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2002898&SiteID=1
http://www.codeproject.com/cs/miscctrl/alphablendtextbox.asp
http://www.codeproject.com/cs/miscctrl/TransparentTextBox.asp
Hope this helps,
Regards