-
Your f1 is another instance of form1.
You can overload the form2 constructor and pass form1 to form2, for example: form1
using system;
using ;
namespace test
public partial class form1 : formpublic form1()
initializecomponent();
private void button1_click(object sender, eventargs e)
form2 form2 = new form2(this);
form2using system;
using ;
namespace windowsformsapplication1public partial class form2 : formform form1;
public form2(form form1)initializecomponent();
form1;
public form2()
initializecomponent();
private void button1_click(object sender, eventargs e)= ;
-
It is to set the opacity property of the subform, but this property cannot be found in the list of properties, and it can be set in the constructor of the subform when it is new.
-
Find opacity (i.e., opacity) in the property list of the subform, the default value is 100%, you can change it directly.
-
There's a formborderstyle property in the form properties, you set it to none and look at the effect you don't want.
-
Modify the opacity property of the subwindow, 0 is completely transparent, 255 is opaque, and the value between 0-255 represents different transparency!!
-
The winform form has a property that can be set to opicity.
-
See also the annex for a better example.
private void form1_load(object sender, eventargs e)
-
Hide the maximization minimization bar on the top of the form, and then set the form to a background color (the color should not be too biased, you will use it later, such as bright red), and then the form has the property transparencykey, and set the color inside to the background color of the form you just selected (bright red), so that the whole form is transparent.
-
BackColor Setting: red (optional) Set a "transparencekey" property to red in the form properties
-
Set the color of the control to a different color and see if the font is displayed, if it still doesn't appear, that's the problem with the control, if it is displayed, just set the control.
-
Win7's Aero,Most of the online is to modify the backcolor to black to achieve the glass matte effect,This seriously affects the font effect in the program。 It is recommended to use the API to implement glass frosting, and no matter how many controls are added, it will not affect the appearance of the controls.
-
Set the background color of the widget to transparent.
-
The best thing to do is to write a configuration file, save the location and size after closing this time, read the file the next time you start it, and set the property information when the form loads.
-
location. There is also size, width and height. The next time you start the program, look at initialization. Read the last location... The phone called. It should be something like this.
-
Set a background color to the form, then set the form transparencykey property and the background color a color, and then the form will be transparent
-
Set it to a color and specify the form's transarentkey property.
Register the keypress event for this textbox.
new ; >>>More
Write this when popping up a modal window.
form2frm >>>More
Your ** is not good in itself, move slowly Unless it is directX programming, in other cases, please use timer instead of directly using loops, otherwise the CPU usage will be very high. >>>More
Find a way to deal with it:
Check whether the filename is an empty string, if it is, do not perform the following operations. >>>More
**Transparent network mark this software, or let others enter, enter your number in the number bar of the software, select China mobie and then OK, it will send a transparent network mark to your mobile phone, store it. >>>More