Make the control with a transparent background color [reference]

xiaoxiao2021-03-06  41

By default, the control does not support transparent background colors. However, by using the Control.setstyle method in the constructor, the control can be made with opaque, transparent or translucent background colors. The setStyle method for the Control class is used to set a specific style preferences for the control and can be used to enable or disable support for transparent background colors.

Enable the control with a transparent background color

Find constructor in the code editor of the control. Call the form of the form of the form in the constructor. SetStyle (ControlStyles.supportstransparentbackColor, True); this will enable the control to support the transparent background color. Add the following code rows to the code line added in step 1. This will set the backcolor of the control to Transparent. THIS.BACKCOLOR = Color.Transparent;

转载请注明原文地址:https://www.9cbs.com/read-68125.html

New Post(0)