⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hello.vb

📁 Bug Game in Visual C++
💻 VB
📖 第 1 页 / 共 2 页
字号:
        Me.r6.Name = "r6"
        Me.r6.Size = New System.Drawing.Size(24, 24)
        Me.r6.TabIndex = 36
        '
        'r7
        '
        Me.r7.BackColor = System.Drawing.Color.Red
        Me.r7.Font = New System.Drawing.Font("Modern No. 20", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.r7.Location = New System.Drawing.Point(264, 352)
        Me.r7.Name = "r7"
        Me.r7.Size = New System.Drawing.Size(24, 24)
        Me.r7.TabIndex = 45
        '
        'bl8
        '
        Me.bl8.BackColor = System.Drawing.Color.FromArgb(CType(0, Byte), CType(0, Byte), CType(192, Byte))
        Me.bl8.Location = New System.Drawing.Point(168, 352)
        Me.bl8.Name = "bl8"
        Me.bl8.Size = New System.Drawing.Size(24, 24)
        Me.bl8.TabIndex = 46
        '
        'MainMenu1
        '
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem3})
        '
        'MenuItem1
        '
        Me.MenuItem1.Index = 0
        Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2})
        Me.MenuItem1.Text = "&File"
        '
        'MenuItem2
        '
        Me.MenuItem2.Index = 0
        Me.MenuItem2.Text = "E&xit"
        '
        'Label2
        '
        Me.Label2.Font = New System.Drawing.Font("Modern No. 20", 12.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label2.Location = New System.Drawing.Point(64, 136)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(120, 24)
        Me.Label2.TabIndex = 47
        Me.Label2.Text = "How To Play:    "
        '
        'Label3
        '
        Me.Label3.Font = New System.Drawing.Font("Modern No. 20", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label3.Location = New System.Drawing.Point(64, 160)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(384, 32)
        Me.Label3.TabIndex = 48
        Me.Label3.Text = "There is a math problem located at the top right of the screen"
        '
        'Label4
        '
        Me.Label4.Font = New System.Drawing.Font("Modern No. 20", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label4.Location = New System.Drawing.Point(64, 192)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(384, 40)
        Me.Label4.TabIndex = 49
        Me.Label4.Text = "Use the left and right arrow keys to move the space ship and the space bar to fir" & _
        "e at the correct answer."
        '
        'Label5
        '
        Me.Label5.Font = New System.Drawing.Font("Modern No. 20", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label5.Location = New System.Drawing.Point(64, 224)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(384, 88)
        Me.Label5.TabIndex = 50
        Me.Label5.Text = "Once you have the correct answer, hit enter. If its right, the score will increas" & _
        "e, if its wrong you will lose a life. If you want to increase the speed, you can" & _
        " hit the tab key.  If you hit the wrong number, you can hit the escape key to de" & _
        "lete the number you hit."
        '
        'Label6
        '
        Me.Label6.Font = New System.Drawing.Font("Modern No. 20", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label6.Location = New System.Drawing.Point(64, 312)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(368, 24)
        Me.Label6.TabIndex = 51
        Me.Label6.Text = "You start with 3 lives and there is a timer."
        '
        'b11
        '
        Me.b11.BackColor = System.Drawing.Color.Black
        Me.b11.Location = New System.Drawing.Point(24, 152)
        Me.b11.Name = "b11"
        Me.b11.Size = New System.Drawing.Size(24, 24)
        Me.b11.TabIndex = 52
        '
        'b10
        '
        Me.b10.BackColor = System.Drawing.Color.Black
        Me.b10.Location = New System.Drawing.Point(24, 272)
        Me.b10.Name = "b10"
        Me.b10.Size = New System.Drawing.Size(24, 24)
        Me.b10.TabIndex = 53
        '
        'b9
        '
        Me.b9.BackColor = System.Drawing.Color.Black
        Me.b9.Location = New System.Drawing.Point(72, 352)
        Me.b9.Name = "b9"
        Me.b9.Size = New System.Drawing.Size(24, 24)
        Me.b9.TabIndex = 54
        '
        'b8
        '
        Me.b8.BackColor = System.Drawing.Color.Black
        Me.b8.Location = New System.Drawing.Point(216, 352)
        Me.b8.Name = "b8"
        Me.b8.Size = New System.Drawing.Size(24, 24)
        Me.b8.TabIndex = 55
        '
        'bl11
        '
        Me.bl11.BackColor = System.Drawing.Color.FromArgb(CType(0, Byte), CType(0, Byte), CType(192, Byte))
        Me.bl11.Location = New System.Drawing.Point(24, 104)
        Me.bl11.Name = "bl11"
        Me.bl11.Size = New System.Drawing.Size(24, 24)
        Me.bl11.TabIndex = 56
        '
        'bl10
        '
        Me.bl10.BackColor = System.Drawing.Color.FromArgb(CType(0, Byte), CType(0, Byte), CType(192, Byte))
        Me.bl10.Location = New System.Drawing.Point(24, 232)
        Me.bl10.Name = "bl10"
        Me.bl10.Size = New System.Drawing.Size(24, 24)
        Me.bl10.TabIndex = 57
        '
        'bl9
        '
        Me.bl9.BackColor = System.Drawing.Color.FromArgb(CType(0, Byte), CType(0, Byte), CType(192, Byte))
        Me.bl9.Location = New System.Drawing.Point(24, 352)
        Me.bl9.Name = "bl9"
        Me.bl9.Size = New System.Drawing.Size(24, 24)
        Me.bl9.TabIndex = 58
        '
        'r11
        '
        Me.r11.BackColor = System.Drawing.Color.Red
        Me.r11.Font = New System.Drawing.Font("Modern No. 20", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.r11.Location = New System.Drawing.Point(24, 64)
        Me.r11.Name = "r11"
        Me.r11.Size = New System.Drawing.Size(24, 24)
        Me.r11.TabIndex = 60
        '
        'r10
        '
        Me.r10.BackColor = System.Drawing.Color.Red
        Me.r10.Font = New System.Drawing.Font("Modern No. 20", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.r10.Location = New System.Drawing.Point(24, 192)
        Me.r10.Name = "r10"
        Me.r10.Size = New System.Drawing.Size(24, 24)
        Me.r10.TabIndex = 61
        '
        'r9
        '
        Me.r9.BackColor = System.Drawing.Color.Red
        Me.r9.Font = New System.Drawing.Font("Modern No. 20", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.r9.Location = New System.Drawing.Point(24, 312)
        Me.r9.Name = "r9"
        Me.r9.Size = New System.Drawing.Size(24, 24)
        Me.r9.TabIndex = 62
        '
        'r8
        '
        Me.r8.BackColor = System.Drawing.Color.Red
        Me.r8.Font = New System.Drawing.Font("Modern No. 20", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.r8.Location = New System.Drawing.Point(120, 352)
        Me.r8.Name = "r8"
        Me.r8.Size = New System.Drawing.Size(24, 24)
        Me.r8.TabIndex = 63
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(208, 328)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(48, 24)
        Me.Button1.TabIndex = 64
        Me.Button1.Text = "OK"
        '
        'MenuItem3
        '
        Me.MenuItem3.Index = 1
        Me.MenuItem3.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem4})
        Me.MenuItem3.Text = "Help"
        '
        'MenuItem4
        '
        Me.MenuItem4.Index = 0
        Me.MenuItem4.Text = "How To Play"
        '
        'Hello
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(10, 23)
        Me.ClientSize = New System.Drawing.Size(496, 385)
        Me.Controls.Add(Me.Button1)
        Me.Controls.Add(Me.r8)
        Me.Controls.Add(Me.r9)
        Me.Controls.Add(Me.r10)
        Me.Controls.Add(Me.r11)
        Me.Controls.Add(Me.bl9)
        Me.Controls.Add(Me.bl10)
        Me.Controls.Add(Me.bl11)
        Me.Controls.Add(Me.b8)
        Me.Controls.Add(Me.b9)
        Me.Controls.Add(Me.b10)
        Me.Controls.Add(Me.b11)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.bl8)
        Me.Controls.Add(Me.r7)
        Me.Controls.Add(Me.PictureBox1)
        Me.Controls.Add(Me.lblcptname)
        Me.Controls.Add(Me.b7)
        Me.Controls.Add(Me.r5)
        Me.Controls.Add(Me.r2)
        Me.Controls.Add(Me.r3)
        Me.Controls.Add(Me.r4)
        Me.Controls.Add(Me.r6)
        Me.Controls.Add(Me.bl6)
        Me.Controls.Add(Me.bl5)
        Me.Controls.Add(Me.bl2)
        Me.Controls.Add(Me.bl3)
        Me.Controls.Add(Me.bl4)
        Me.Controls.Add(Me.bl7)
        Me.Controls.Add(Me.b5)
        Me.Controls.Add(Me.b3)
        Me.Controls.Add(Me.b4)
        Me.Controls.Add(Me.b2)
        Me.Controls.Add(Me.b6)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.r1)
        Me.Controls.Add(Me.bl1)
        Me.Controls.Add(Me.b1)
        Me.Font = New System.Drawing.Font("Modern No. 20", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Menu = Me.MainMenu1
        Me.Name = "Hello"
        Me.Text = "Hello"
        Me.ResumeLayout(False)

    End Sub

#End Region

    
    Private Sub Hello_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.lblcptname.Text = f0.txtname.Text
        f1 = Me


        Me.Timer2.Enabled = True
        Me.Timer3.Enabled = True
        Me.Timer4.Enabled = True

    End Sub

   

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick

        If Me.b1.Visible = True Then Me.b1.Visible = False Else Me.b1.Visible = True
        If Me.b2.Visible = True Then Me.b2.Visible = False Else Me.b2.Visible = True
        If Me.b3.Visible = True Then Me.b3.Visible = False Else Me.b3.Visible = True
        If Me.b4.Visible = True Then Me.b4.Visible = False Else Me.b4.Visible = True
        If Me.b5.Visible = True Then Me.b5.Visible = False Else Me.b5.Visible = True
        If Me.b6.Visible = True Then Me.b6.Visible = False Else Me.b6.Visible = True
        If Me.b7.Visible = True Then Me.b7.Visible = False Else Me.b7.Visible = True
        If Me.b8.Visible = True Then Me.b8.Visible = False Else Me.b8.Visible = True
        If Me.b9.Visible = True Then Me.b9.Visible = False Else Me.b9.Visible = True
        If Me.b10.Visible = True Then Me.b10.Visible = False Else Me.b10.Visible = True
        If Me.b11.Visible = True Then Me.b11.Visible = False Else Me.b11.Visible = True

    End Sub

    Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick

        If Me.bl1.Visible = True Then Me.bl1.Visible = False Else Me.bl1.Visible = True
        If Me.bl2.Visible = True Then Me.bl2.Visible = False Else Me.bl2.Visible = True
        If Me.bl3.Visible = True Then Me.bl3.Visible = False Else Me.bl3.Visible = True
        If Me.bl4.Visible = True Then Me.bl4.Visible = False Else Me.bl4.Visible = True
        If Me.bl5.Visible = True Then Me.bl5.Visible = False Else Me.bl5.Visible = True
        If Me.bl6.Visible = True Then Me.bl6.Visible = False Else Me.bl6.Visible = True
        If Me.bl7.Visible = True Then Me.bl7.Visible = False Else Me.bl7.Visible = True
        If Me.bl8.Visible = True Then Me.bl8.Visible = False Else Me.bl8.Visible = True
        If Me.bl9.Visible = True Then Me.bl9.Visible = False Else Me.bl9.Visible = True
        If Me.bl10.Visible = True Then Me.bl10.Visible = False Else Me.bl10.Visible = True
        If Me.bl11.Visible = True Then Me.bl11.Visible = False Else Me.bl11.Visible = True

    End Sub

    Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick

        If Me.r1.Visible = True Then Me.r1.Visible = False Else Me.r1.Visible = True
        If Me.r2.Visible = True Then Me.r2.Visible = False Else Me.r2.Visible = True
        If Me.r3.Visible = True Then Me.r3.Visible = False Else Me.r3.Visible = True
        If Me.r4.Visible = True Then Me.r4.Visible = False Else Me.r4.Visible = True
        If Me.r5.Visible = True Then Me.r5.Visible = False Else Me.r5.Visible = True
        If Me.r6.Visible = True Then Me.r6.Visible = False Else Me.r6.Visible = True
        If Me.r7.Visible = True Then Me.r7.Visible = False Else Me.r7.Visible = True
        If Me.r8.Visible = True Then Me.r8.Visible = False Else Me.r8.Visible = True
        If Me.r9.Visible = True Then Me.r9.Visible = False Else Me.r9.Visible = True
        If Me.r10.Visible = True Then Me.r10.Visible = False Else Me.r10.Visible = True
        If Me.r11.Visible = True Then Me.r11.Visible = False Else Me.r11.Visible = True

    End Sub

    Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
        If MsgBox("Do you really want to exit?", MsgBoxStyle.YesNo, "Confirm with User") = MsgBoxResult.Yes Then End

    End Sub

 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        f1.Hide()
        f2.Show()

    End Sub

    Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click
        f4.Show()
    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -