c # Set button, label, etc. in the presence or absence of a control Picture control the background color is transparent

Label transparent set

1. No picture controls

Change the Label BackColor property to Transparent

2. picture controls

① Change Label BackColor property to Transparent

② fill in the code needs to run in the event

Label.Parent=Picture;

 

Button set transparent

1. No picture controls

Change the Label BackColor property to Transparent

Change the Button properties as Flat FlatStyle

2. picture controls

① Change Button BackColor property to Transparent

    Change the Button properties as Flat FlatStyle

② fill in the code needs to run in the event

Button.Parent=Picture;

 

Published 62 original articles · won praise 39 · views 120 000 +

Guess you like

Origin blog.csdn.net/liangjiabao5555/article/details/97779719