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

📄 frmplayer.vb

📁 TicTacToe Game In VC++
💻 VB
字号:
Public Class FrmPlayer
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    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.
    Friend WithEvents lblPone As System.Windows.Forms.Label
    Friend WithEvents Lblptwo As System.Windows.Forms.Label
    Friend WithEvents txtPOne As System.Windows.Forms.TextBox
    Friend WithEvents txtPTwo As System.Windows.Forms.TextBox
	Friend WithEvents txtTextBox As System.Windows.Forms.TextBox
    Friend WithEvents BtnPlay As System.Windows.Forms.Button
    Friend WithEvents BtnClose As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmPlayer))
        Me.lblPone = New System.Windows.Forms.Label
        Me.Lblptwo = New System.Windows.Forms.Label
        Me.txtPOne = New System.Windows.Forms.TextBox
        Me.txtPTwo = New System.Windows.Forms.TextBox
		Me.txtTextBox = New System.Windows.Forms.TextBox
        Me.BtnPlay = New System.Windows.Forms.Button
        Me.BtnClose = New System.Windows.Forms.Button
        Me.SuspendLayout()
        '
        'lblPone
        '
        Me.lblPone.AutoSize = True
        Me.lblPone.Location = New System.Drawing.Point(35, 24)
        Me.lblPone.Name = "lblPone"
        Me.lblPone.Size = New System.Drawing.Size(61, 16)
        Me.lblPone.TabIndex = 0
        Me.lblPone.Text = "Player One"
        '
        'Lblptwo
        '
        Me.Lblptwo.AutoSize = True
        Me.Lblptwo.Location = New System.Drawing.Point(35, 55)
        Me.Lblptwo.Name = "Lblptwo"
        Me.Lblptwo.Size = New System.Drawing.Size(61, 16)
        Me.Lblptwo.TabIndex = 1
        Me.Lblptwo.Text = "Player Two"
        '
        'txtPOne
        '
        Me.txtPOne.Location = New System.Drawing.Point(99, 23)
        Me.txtPOne.Name = "txtPOne"
        Me.txtPOne.Size = New System.Drawing.Size(112, 20)
        Me.txtPOne.TabIndex = 2
        Me.txtPOne.Text = ""
        '
        'txtPTwo
        '
        Me.txtPTwo.Location = New System.Drawing.Point(99, 53)
        Me.txtPTwo.Name = "txtPTwo"
        Me.txtPTwo.Size = New System.Drawing.Size(112, 20)
        Me.txtPTwo.TabIndex = 3
        Me.txtPTwo.Text = ""
        '
		'txtTextBox
        '
        Me.txtTextBox.Location = New System.Drawing.Point(99, 53)
        Me.txtTextBox.Name = "txtPTwo"
        Me.txtTextBox.Size = New System.Drawing.Size(112, 20)
        Me.txtTextBox.TabIndex = 3
        Me.txtTextBox.Text = ""
        'BtnPlay
        '
        Me.BtnPlay.Location = New System.Drawing.Point(56, 88)
        Me.BtnPlay.Name = "BtnPlay"
        Me.BtnPlay.Size = New System.Drawing.Size(72, 24)
        Me.BtnPlay.TabIndex = 4
        Me.BtnPlay.Text = "&Play"
        '
        'BtnClose
        '
        Me.BtnClose.Location = New System.Drawing.Point(140, 88)
        Me.BtnClose.Name = "BtnClose"
        Me.BtnClose.Size = New System.Drawing.Size(72, 24)
        Me.BtnClose.TabIndex = 5
        Me.BtnClose.Text = "&Close"
        '
        'FrmPlayer
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(256, 126)
        Me.Controls.Add(Me.BtnClose)
        Me.Controls.Add(Me.BtnPlay)
        Me.Controls.Add(Me.txtPTwo)
        Me.Controls.Add(Me.txtPOne)
        Me.Controls.Add(Me.Lblptwo)
        Me.Controls.Add(Me.lblPone)
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "FrmPlayer"
        Me.ShowInTaskbar = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Tic - Tec - Toe"
        Me.ResumeLayout(False)

    End Sub

#End Region
   
    Private Sub BtnPlay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnPlay.Click

        If txtPOne.Text = "" Then
            MsgBox("Please enter first player name...", MsgBoxStyle.Information + MsgBoxStyle.OKOnly)
            txtPOne.Focus()
            Exit Sub
        ElseIf txtPTwo.Text = "" Then
            MsgBox("Please enter second player name...", MsgBoxStyle.Information + MsgBoxStyle.OKOnly)
            txtPTwo.Focus()
            Exit Sub
        End If
        Dim ObjFrmGame As New FrmGame
        ObjFrmGame.temp(Me)
        ObjFrmGame.Show()
        Me.Hide()
    End Sub


    Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClose.Click
        Me.Dispose()
    End Sub
End Class

⌨️ 快捷键说明

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