Home > Software engineering >  O using vb to do a theater seat selection system
O using vb to do a theater seat selection system

Time:11-20

For years, for operating the best a little egg all the code a little thank you

CodePudding user response:

Do you have any bosses in wow emergency

CodePudding user response:

River's lake at least also want to save, the right to waste nothing save, concentrate on cut classes to play games bubble girl go,

CodePudding user response:

(1) to CSDN charge
(2) to download https://download.csdn.net/download/lina9133/3983238
(3) a job

CodePudding user response:

Picture has been quite good, isn't it? Fumbling with what?

CodePudding user response:

Write well, code is as follows:
 
Option Explicit

Private Sub cmdEnd_Click ()
Unload Me
End Sub

Private Sub cmdSeat_Click (Index As an Integer)
If IsButtonChecked (Index) Then
MsgBox "the seat has been selected!" , vbExclamation
The Else
SetButtonChecked Index, True
MsgBox "has been successfully select this seat, from now on, please do not repeat to select this seat," the vbInformation
End the If
End Sub

Private Sub cmdSelect_Click ()
If Not IsNumeric (txtRow. Text) Or Not IsNumeric (txtCol. Text) Then
MsgBox "please input the correct number!" , vbExclamation
The Exit Sub
End the If

Dim intIndex As Integer
IntIndex=GetIndex (txtRow. Text, txtCol. Text)

If intIndex & lt; CmdSeat. LBound Or intIndex & gt; CmdSeat. UBound Then
MsgBox "the wrong position!" , vbExclamation
The Else
CmdSeat (intIndex). Value=https://bbs.csdn.net/topics/True
End the If
End Sub

Private Sub cmdStatics_Click ()
Dim strMsg As String
StrMsg="has been selected location is as follows" & amp; VbCrLf & amp; "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --" & amp; VbCrLf

Dim As Integer I
For I=cmdSeat. LBound To cmdSeat. UBound
If IsButtonChecked (I) Then
StrMsg=strMsg & amp; "The first" & amp; GetRow (I) & amp; "The first line," & amp; GetCol (I) & amp; "Column" & amp; VbCrLf & amp; "-- -- -- -- -- -- -- -- -- -- -- -- -- --" & amp; VbCrLf
End the If
Next

MsgBox strMsg
End Sub

Private Sub Form_Load ()
Dim As Integer I
For I=cmdSeat. LBound To cmdSeat. UBound
With cmdSeat (I)
The BackColor=vbWhite
SetButtonChecked I, False
End With
Next
End Sub

Private Function GetIndex (ByVal intRow As an Integer, ByVal intCol As Integer) As an Integer
GetIndex=(intRow - 1) * 5 + (intCol - 1)
End the Function

Private Function GetRow (ByVal intIndex As Integer) As an Integer
GetRow=intIndex \ 5 + 1
End the Function

Private Function GetCol (ByVal intIndex As Integer) As an Integer
GetCol=intIndex Mod 5 + 1
End the Function

Private Function IsButtonChecked (ByVal intIndex As Integer) As Boolean
IsButtonChecked=(cmdSeat (intIndex). BackColor=vbRed)
End the Function

Private Sub SetButtonChecked (ByVal intIndex As an Integer, ByVal blnValue As Boolean)
With cmdSeat (intIndex)
Dim strStatus As String

If blnValue Then
The BackColor=vbRed
StrStatus="(optional)"
The Else
The BackColor=vbWhite
StrStatus="(empty)"
End the If
Caption=GetRow (intIndex) & amp; "Row" & amp; GetCol (intIndex) & amp; "Column" & amp; StrStatus
End With
End Sub

Run the example:

Download address:
Link: https://pan.baidu.com/s/1B1dPzZzCg4_Hyl18of4bfw
The extracted code: b0mk

CodePudding user response:

Mickey Mouse efficiency is very high, but really don't recommend this with these guys,

CodePudding user response:

Mickey Mouse is tencent's engineer, give a interface can do an identical,
  • Related