简体   繁体   English

Winform c# combobox 边框像我程序的一个洞

[英]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.我有一个 winform 项目,我在其中添加了一个 combobox,但边框就像我程序中的一个洞。 If I click on the borders, it navigates me to the window under.如果我单击边框,它会将我导航到下面的 window。

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;

For those who meet with this problem again: Change the TransparencyKey to none in the Form's Properties对于再次遇到此问题的人:在窗体的属性中将TransparencyKey更改为 none

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM