2

当我System.Windows.Forms.ListView在 WinForm 应用程序(使用 C#/.NET 4.5)中的表单上放置 a 时,即使BorderStyle属性设置为Fixed3D. TextBox对于许多其他控件也是如此。

这是表单设计器为ListView. 该表单只是一个普通的Form,目前没有其他控件。

...
this.listView1.Location = new System.Drawing.Point(10, 115);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(250, 97);
this.listView1.TabIndex = 2;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
...

如果我打开较旧的程序(使用 VB6 或 .NET 2 完成),控件边框以 3D 外观呈现(即控件以适当的 3D 边框呈现)而不是平坦的。

我能做些什么来强制 3D 查找 .NET 4.5 下的这些控件吗?

4

1 回答 1

3

这肯定有效,但我认为它也适用于表单上的所有控件,只需删除文件Application.EnableVisualStyles()Main()方法中的行。Program.cs

于 2013-08-04T04:22:38.080 回答