0

我已经阅读了几个论坛并尝试了不同的选项。大多数答案都是this,这让我认为这就是问题所在。我放在.Designer.vb文件Application.EnableVisualStyles() 的开头,如下所示:InitializeComponent()

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class MetadataCollectionGUI
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()>
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()>
    Private Sub InitializeComponent()
        Application.EnableVisualStyles() '     <--- See Here
        Me.ListViewMetaDataCollection = New System.Windows.Forms.ListView()
        Me.ColumnTags = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
        etc... etc...
    End Sub
    
    Etc...
    
End Class

我是否误解了如何执行该特定解决方案,或者问题是否有所不同?

4

1 回答 1

0

我发现了问题所在。转到项目属性并启用应用程序框架。现在您可以启用 XP 视觉样式。

在此处输入图像描述


谢谢 Hursey 和 jmcilhinney,如果没有你们,我不会想出来的!

于 2021-07-29T14:00:13.427 回答