您好,我使用vb.net在Visual Studio上创建了媒体播放器程序。我的应用程序的基本功能是一个简单的GUI导航系统,用户可以在其中选择诸如“主页”和“上传”之类的选项卡,并且每个选项卡上都会显示不同的页面。为此,我创建了用户控件,将其加载到主窗体中,并在未选中时将可见性设置为false。
问题是每次构建程序时我都会出错/我关闭并重新打开程序。
设计人员无法在第324行处理未知名称“ BackColor”。方法“ InitializeComponent”中的代码是由设计人员生成的,不应手动对其进行修改。请删除所有更改,然后尝试再次打开设计器。
查看此代码将定向到此块-
'
'Uploader_Control2
'
Me.Uploader_Control2.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Uploader_Control2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Uploader_Control2.Location = New System.Drawing.Point(248, 23)
Me.Uploader_Control2.Name = "Uploader_Control2"
Me.Uploader_Control2.Size = New System.Drawing.Size(1180, 656)
Me.Uploader_Control2.TabIndex = 0
'
'Home_Control2
'
Me.Home_Control2.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Home_Control2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Home_Control2.Location = New System.Drawing.Point(248, 23)
Me.Home_Control2.Name = "Home_Control2"
Me.Home_Control2.Size = New System.Drawing.Size(1180, 656)
Me.Home_Control2.TabIndex = 1
'
'Uploader_Control1
'
Me.Uploader_Control1.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Uploader_Control1.Location = New System.Drawing.Point(0, 0)
Me.Uploader_Control1.Name = "Uploader_Control1"
Me.Uploader_Control1.Size = New System.Drawing.Size(1180, 656)
Me.Uploader_Control1.TabIndex = 0
'
'Home_Control1
'
Me.Home_Control1.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Home_Control1.Location = New System.Drawing.Point(0, 0)
Me.Home_Control1.Name = "Home_Control1"
Me.Home_Control1.Size = New System.Drawing.Size(1180, 656)
Me.Home_Control1.TabIndex = 0
删除这段代码可以消除错误,并以我的形式向用户显示控件的显示方式。它开始成为一个持久而烦人的问题,尽管进行了研究,但我仍然很难找到有关如何解决它的任何信息。
除了此加载之外,任何类似这样的用户控件都会返回错误-
Private Sub Uploader_Control2_Load(sender As Object, e As EventArgs) Handles Uploader_Control2.Load
End Sub
找不到事件负载
感谢所有帮助。预先感谢。