简体   繁体   中英

Windows Form Custom User Control not visible in design mode

I have created my own custom user control and is working just fine in debug mode. The problem is that when i add it in a design mode the back color of the form and the control is the same so when i deselect the control it is very difficult to re-select it as i need to remember where exactly i put it in the form.

Is there a method that will help? For example is there a code that i can write in the custom control that it will make it visible (like changing the back color of the control in design view only)

You can close the form that contain your custom control (design) and reopen the form. That's it, When you build project, Custom control become transparent and you can reopen the form. it will fire paint event for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM