'Winform c# combobox border is like a hole in my program
I know this is a minor thing but it's really annoying. I have a winform project where I've added a combobox, but the borders is like a hole in my program. If I click on the borders, it navigates me to the window under.
Properties set
this.cbAvailableProjects.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.cbAvailableProjects.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbAvailableProjects.BackColor = System.Drawing.SystemColors.Control;
this.cbAvailableProjects.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbAvailableProjects.Font = new System.Drawing.Font("Century Gothic", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbAvailableProjects.FormattingEnabled = true;
this.cbAvailableProjects.Location = new System.Drawing.Point(20, 33);
this.cbAvailableProjects.Name = "cbAvailableProjects";
this.cbAvailableProjects.Size = new System.Drawing.Size(197, 25);
this.cbAvailableProjects.TabIndex = 4;
Solution 1:[1]
For those who meet with this problem again: Change the TransparencyKey to none in the Form's Properties
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Nicholas |