Home > Net >  C # controls are completely transparent
C # controls are completely transparent

Time:09-20

Step 1:
//* in the main method to set the transparency *//
SetStyle (ControlStyles. Opaque, true);//set the transparency

Step 2:
//* * completely transparent method//
Protected override CreateParams CreateParams
{
The get
{
CreateParams cp=base. CreateParams;
Cp. ExStyle |=0 x00000020;//implementation transparent style
Return the cp;
}
}

CodePudding user response:

Slowly will find that it is useless,

CodePudding user response:

With you this, for example, transparent a Textbox, so font color, only black

CodePudding user response:

What is "transparent" specific mechanism? You may not too understand in normal controls, such as the user use the mouse to pick one of the line, a word, a small icon, then the user how to penetrate your transparent controls? What do you need a "transparent controls" or a Panel?

CodePudding user response:

Make several controls, the control area of overlap, transparent effect can be

CodePudding user response:

Drawing directly, or the background cover part of the map

CodePudding user response:

Control controls the recessive, hidden controls is not transparent?

CodePudding user response:

In transparent controls, used for drawing the floor plan
  •  Tags:  
  • C#
  • Related