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

📄 frmcontact.frm

📁 星级酒店管理系统VB源代码
💻 FRM
📖 第 1 页 / 共 4 页
字号:
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "传真号码:"
            ForeColor       =   &H00FFFFFF&
            Height          =   255
            Index           =   12
            Left            =   3120
            TabIndex        =   24
            Top             =   4380
            Width           =   1500
         End
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "移动电话:"
            ForeColor       =   &H8000000E&
            Height          =   255
            Index           =   11
            Left            =   0
            TabIndex        =   23
            Top             =   5040
            Width           =   1500
         End
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "工作电话:"
            ForeColor       =   &H8000000E&
            Height          =   255
            Index           =   9
            Left            =   0
            TabIndex        =   22
            Top             =   4320
            Width           =   1500
         End
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "公司名称:"
            ForeColor       =   &H8000000E&
            Height          =   255
            Index           =   7
            Left            =   0
            TabIndex        =   21
            Top             =   495
            Width           =   1500
         End
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "邮政编码:"
            ForeColor       =   &H8000000E&
            Height          =   255
            Index           =   6
            Left            =   0
            TabIndex        =   20
            Top             =   3900
            Width           =   1500
         End
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "省份:"
            ForeColor       =   &H00FFFFFF&
            Height          =   255
            Index           =   5
            Left            =   3120
            TabIndex        =   19
            Top             =   3540
            Width           =   1500
         End
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "城市:"
            ForeColor       =   &H8000000E&
            Height          =   255
            Index           =   4
            Left            =   0
            TabIndex        =   18
            Top             =   3495
            Width           =   1500
         End
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "地址:"
            ForeColor       =   &H8000000E&
            Height          =   255
            Index           =   3
            Left            =   0
            TabIndex        =   17
            Top             =   3120
            Width           =   1500
         End
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "职务:"
            ForeColor       =   &H8000000E&
            Height          =   255
            Index           =   2
            Left            =   0
            TabIndex        =   16
            Top             =   2280
            Width           =   1500
         End
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "姓名:"
            ForeColor       =   &H8000000E&
            Height          =   255
            Index           =   1
            Left            =   0
            TabIndex        =   15
            Top             =   1620
            Width           =   1500
         End
         Begin VB.Label lblLabels 
            Alignment       =   1  'Right Justify
            BackStyle       =   0  'Transparent
            Caption         =   "联系人ID:"
            Height          =   255
            Index           =   0
            Left            =   0
            TabIndex        =   13
            Top             =   -300
            Visible         =   0   'False
            Width           =   1815
         End
      End
      Begin VB.Image Image1 
         Height          =   2700
         Left            =   7380
         Picture         =   "frmContact.frx":006F
         Stretch         =   -1  'True
         Top             =   840
         Width           =   1980
      End
   End
   Begin MSAdodcLib.Adodc datPrimaryRS 
      Align           =   2  'Align Bottom
      Height          =   330
      Left            =   0
      Top             =   6900
      Width           =   9615
      _ExtentX        =   16960
      _ExtentY        =   582
      ConnectMode     =   3
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   1
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "PROVIDER=MSDASQL;dsn=DM;uid=;pwd=;"
      OLEDBString     =   "PROVIDER=MSDASQL;dsn=DM;uid=;pwd=;"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   $"frmContact.frx":04B1
      Caption         =   " "
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "frmContact"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Form_Unload(Cancel As Integer)
  Screen.MousePointer = vbDefault
End Sub

Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
  '错误处理程序代码置于此处
  '想要忽略错误,注释掉下一行
  '想要捕获它们,在此添加代码以处理它们
  MsgBox "Data error event hit err:" & Description
End Sub

Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
  '为这个 recordset 显示当前记录位置
  datPrimaryRS.Caption = "Record: " & CStr(datPrimaryRS.Recordset.AbsolutePosition)
End Sub

Private Sub datPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
  '验证代码置于此处
  '下列动作发生时该事件被调用
  Dim bCancel As Boolean

  Select Case adReason
  Case adRsnAddNew
  Case adRsnClose
  Case adRsnDelete
  Case adRsnFirstChange
  Case adRsnMove
  Case adRsnRequery
  Case adRsnResynch
  Case adRsnUndoAddNew
  Case adRsnUndoDelete
  Case adRsnUndoUpdate
  Case adRsnUpdate
  End Select

  If bCancel Then adStatus = adStatusCancel
End Sub

Private Sub cmdAdd_Click()
  On Error GoTo AddErr
  datPrimaryRS.Recordset.AddNew

  Exit Sub
AddErr:
  MsgBox Err.Description
End Sub

Private Sub cmdDelete_Click()
  On Error GoTo DeleteErr
  With datPrimaryRS.Recordset
    .Delete
    .MoveNext
    If .EOF Then .MoveLast
  End With
  Exit Sub
DeleteErr:
  MsgBox Err.Description
End Sub

Private Sub cmdRefresh_Click()
  '只有多用户应用程序需要
  On Error GoTo RefreshErr
  datPrimaryRS.Refresh
  Exit Sub
RefreshErr:
  MsgBox Err.Description
End Sub

Private Sub cmdUpdate_Click()
  On Error GoTo UpdateErr

  datPrimaryRS.Recordset.MovePrevious
  datPrimaryRS.Recordset.MoveNext
  DataGrid1.Refresh
  Exit Sub
UpdateErr:
  MsgBox Err.Description
End Sub

Private Sub cmdClose_Click()
  Unload fMainForm.ActiveForm
  fMainForm.Picture2.Visible = True
End Sub

Private Sub txtFields_LostFocus(Index As Integer)
    txtFields(Index).BackColor = vbWhite
    txtFields(Index).ForeColor = vbBlack
End Sub
Private Sub txtFields_GotFocus(Index As Integer)
    txtFields(Index).BackColor = vbBlue
    txtFields(Index).ForeColor = vbWhite

End Sub

Private Sub txtFields_Validate(Index As Integer, Cancel As Boolean)
    Dim temps As String
    
    Select Case Index
    Case 7
        If txtFields(Index).Text = "" Then
           MsgBox "该项目必须填写,请重新输入。", vbCritical, "We Link Zone."
           txtFields(Index).SetFocus
        Else
            temps = txtFields(Index).Text
            txtFields(Index).Text = temps
        End If
    Case 1, 3, 5, 6
        If txtFields(Index).Text = "" Then
            MsgBox "该项目必须填写,请重新输入。", vbCritical, "We Link Zone."
            txtFields(Index).SetFocus
        End If
    Case Else
        Exit Sub
    End Select
End Sub


⌨️ 快捷键说明

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