The Button Button=new System. Windows. Forms. The Button (); button. BackColor=System. Drawing. Color. Red; Button. The Location=new System. Drawing. Point (65, 108); Button. The Name="button12"; Button. The Size=new System. Drawing. The Size (75, 23); Button. The TabIndex=0; Button. The Text="button12"; This. Controls. The Add (button);
Set the button. The BackColor=System. Drawing. Color. Red, but when the program runs, the background Color of the button has not changed, and the button. The UseVisualStyleBackColor attribute is set to false, how can I change the background Color of the button, thank you.
CodePudding user response:
I guess you is a button on the form, a you do according to this button again, and then added, of course, you can't see, he was held up by the original button you form,