无法在Windows窗体中启用操作

时间:2019-07-05 00:45:10

标签: vb.net winforms

在Windows窗体中,我无法编辑从工具箱添加到窗体的组件事件。

我对Windows窗体还很陌生。我已经在工作中使用过几次。当我双击窗体中的一个组件时。我被重定向到Form1.vb。我所期望的是,但是Form1.vb中唯一的东西是Public Class Form1 ... End Class。班里什么都没有。
在我双击Windows窗体中的组件时使用Windows窗体之前,我被重定向到该事件的方法。现在这没有发生。
我也无法通过“属性”窗口更改事件。

设计师在这里:

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    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()
        Me.PictureBox1 = New System.Windows.Forms.PictureBox()
        Me.PictureBox2 = New System.Windows.Forms.PictureBox()
        Me.PictureBox3 = New System.Windows.Forms.PictureBox()
        Me.PictureBox4 = New System.Windows.Forms.PictureBox()
        Me.redGhost = New System.Windows.Forms.PictureBox()
        Me.yellowGhost = New System.Windows.Forms.PictureBox()
        Me.pinkGhost = New System.Windows.Forms.PictureBox()
        Me.pacman = New System.Windows.Forms.PictureBox()
        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.PictureBox4, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.redGhost, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.yellowGhost, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.pinkGhost, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.pacman, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'PictureBox1
        '
        Me.PictureBox1.BackColor = System.Drawing.Color.MidnightBlue
        Me.PictureBox1.Location = New System.Drawing.Point(197, 39)
        Me.PictureBox1.Name = "PictureBox1"
        Me.PictureBox1.Size = New System.Drawing.Size(28, 183)
        Me.PictureBox1.TabIndex = 0
        Me.PictureBox1.TabStop = False
        Me.PictureBox1.Tag = "wall"
        '
        'PictureBox2
        '
        Me.PictureBox2.BackColor = System.Drawing.Color.MidnightBlue
        Me.PictureBox2.Location = New System.Drawing.Point(55, 302)
        Me.PictureBox2.Name = "PictureBox2"
        Me.PictureBox2.Size = New System.Drawing.Size(28, 183)
        Me.PictureBox2.TabIndex = 1
        Me.PictureBox2.TabStop = False
        Me.PictureBox2.Tag = "wall"
        '
        'PictureBox3
        '
        Me.PictureBox3.BackColor = System.Drawing.Color.MidnightBlue
        Me.PictureBox3.Location = New System.Drawing.Point(358, 302)
        Me.PictureBox3.Name = "PictureBox3"
        Me.PictureBox3.Size = New System.Drawing.Size(29, 183)
        Me.PictureBox3.TabIndex = 2
        Me.PictureBox3.TabStop = False
        Me.PictureBox3.Tag = "wall"
        '
        'PictureBox4
        '
        Me.PictureBox4.BackColor = System.Drawing.Color.MidnightBlue
        Me.PictureBox4.Location = New System.Drawing.Point(515, 39)
        Me.PictureBox4.Name = "PictureBox4"
        Me.PictureBox4.Size = New System.Drawing.Size(28, 183)
        Me.PictureBox4.TabIndex = 3
        Me.PictureBox4.TabStop = False
        Me.PictureBox4.Tag = "wall"
        '
        'redGhost
        '
        Me.redGhost.Location = New System.Drawing.Point(251, 106)
        Me.redGhost.Name = "redGhost"
        Me.redGhost.Size = New System.Drawing.Size(36, 38)
        Me.redGhost.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
        Me.redGhost.TabIndex = 4
        Me.redGhost.TabStop = False
        Me.redGhost.Tag = "ghost"
        '
        'yellowGhost
        '
        Me.yellowGhost.Location = New System.Drawing.Point(89, 382)
        Me.yellowGhost.Name = "yellowGhost"
        Me.yellowGhost.Size = New System.Drawing.Size(36, 38)
        Me.yellowGhost.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
        Me.yellowGhost.TabIndex = 5
        Me.yellowGhost.TabStop = False
        Me.yellowGhost.Tag = "ghost"
        '
        'pinkGhost
        '
        Me.pinkGhost.Location = New System.Drawing.Point(393, 382)
        Me.pinkGhost.Name = "pinkGhost"
        Me.pinkGhost.Size = New System.Drawing.Size(36, 38)
        Me.pinkGhost.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
        Me.pinkGhost.TabIndex = 6
        Me.pinkGhost.TabStop = False
        Me.pinkGhost.Tag = "ghost"
        '
        'pacman
        '
        Me.pacman.Location = New System.Drawing.Point(346, 171)
        Me.pacman.Name = "pacman"
        Me.pacman.Size = New System.Drawing.Size(40, 40)
        Me.pacman.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
        Me.pacman.TabIndex = 7
        Me.pacman.TabStop = False
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(609, 531)
        Me.Controls.Add(Me.pacman)
        Me.Controls.Add(Me.pinkGhost)
        Me.Controls.Add(Me.yellowGhost)
        Me.Controls.Add(Me.redGhost)
        Me.Controls.Add(Me.PictureBox4)
        Me.Controls.Add(Me.PictureBox3)
        Me.Controls.Add(Me.PictureBox2)
        Me.Controls.Add(Me.PictureBox1)
        Me.Name = "Form1"
        Me.Text = "Miss PACMAN"
        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.PictureBox4, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.redGhost, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.yellowGhost, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.pinkGhost, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.pacman, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

    Friend WithEvents PictureBox1 As PictureBox
    Friend WithEvents PictureBox2 As PictureBox
    Friend WithEvents PictureBox3 As PictureBox
    Friend WithEvents PictureBox4 As PictureBox
    Friend WithEvents redGhost As PictureBox
    Friend WithEvents yellowGhost As PictureBox
    Friend WithEvents pinkGhost As PictureBox
    Friend WithEvents pacman As PictureBox
End Class

0 个答案:

没有答案