I finally found two working ways for solving this:
1. Send textbox focus away
Sending focus to another component on Form initialization:
public Form1(){
InitializeComponent();
textBox1.Enter += (s, e) => { textBox1.Parent.Focus(); };
}
2. Create a Label and customize it
In the label properties, set:
BorderStyle = Fixed3D
BackColor = Window
AutoSize = False
And resize the label in the form design view
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.