frmyellow2.frm

来自「Online Telephone Directory in Visual Bas」· FRM 代码 · 共 339 行

FRM
339
字号
VERSION 5.00
Begin VB.Form Form15 
   BackColor       =   &H0000C0C0&
   BorderStyle     =   0  'None
   Caption         =   "Form15"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form15"
   ScaleHeight     =   11115
   ScaleWidth      =   15240
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   12840
      Top             =   6720
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0FFFF&
      BorderStyle     =   0  'None
      Caption         =   "Frame1"
      Height          =   6855
      Left            =   960
      TabIndex        =   1
      Top             =   3240
      Width           =   12975
      Begin VB.CommandButton Command5 
         BackColor       =   &H0000FFFF&
         Caption         =   "Back"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   735
         Left            =   10920
         Picture         =   "FrmYellow2.frx":0000
         Style           =   1  'Graphical
         TabIndex        =   12
         Top             =   4320
         Width           =   1815
      End
      Begin VB.CommandButton Command4 
         BackColor       =   &H0000FFFF&
         Caption         =   ">>"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   7200
         Style           =   1  'Graphical
         TabIndex        =   11
         Top             =   3600
         Width           =   1815
      End
      Begin VB.CommandButton Command3 
         BackColor       =   &H0000FFFF&
         Caption         =   "<"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   5040
         Style           =   1  'Graphical
         TabIndex        =   10
         Top             =   3600
         Width           =   1815
      End
      Begin VB.CommandButton Command2 
         BackColor       =   &H0000FFFF&
         Caption         =   ">"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   2880
         Style           =   1  'Graphical
         TabIndex        =   9
         Top             =   3600
         Width           =   1815
      End
      Begin VB.CommandButton Command1 
         BackColor       =   &H0000FFFF&
         Caption         =   "<<"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   720
         Style           =   1  'Graphical
         TabIndex        =   8
         Top             =   3600
         Width           =   1815
      End
      Begin VB.Image Image4 
         Height          =   2415
         Left            =   480
         Top             =   4200
         Width           =   8655
      End
      Begin VB.Label Label7 
         BackColor       =   &H00008000&
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   375
         Left            =   2880
         TabIndex        =   7
         Top             =   2280
         Width           =   7695
      End
      Begin VB.Label Label6 
         BackColor       =   &H00C0FFC0&
         Caption         =   "Phone"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   720
         TabIndex        =   6
         Top             =   2280
         Width           =   2175
      End
      Begin VB.Label Label5 
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   975
         Left            =   2880
         TabIndex        =   5
         Top             =   1200
         Width           =   7695
         WordWrap        =   -1  'True
      End
      Begin VB.Label Label4 
         BackColor       =   &H00C0FFC0&
         Caption         =   "Address"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   720
         TabIndex        =   4
         Top             =   1200
         Width           =   2175
      End
      Begin VB.Label Label3 
         BackColor       =   &H000080FF&
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   375
         Left            =   2880
         TabIndex        =   3
         Top             =   720
         Width           =   7695
      End
      Begin VB.Label Label2 
         BackColor       =   &H00C0FFC0&
         Caption         =   "Name"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   720
         TabIndex        =   2
         Top             =   720
         Width           =   2175
      End
   End
   Begin VB.Image Image3 
      Height          =   2415
      Left            =   11520
      Picture         =   "FrmYellow2.frx":29C12
      Top             =   840
      Width           =   2370
   End
   Begin VB.Image Image2 
      Height          =   1170
      Left            =   3360
      Picture         =   "FrmYellow2.frx":2C5D4
      Top             =   840
      Width           =   8205
   End
   Begin VB.Image Image1 
      Height          =   2415
      Left            =   960
      Picture         =   "FrmYellow2.frx":2F907
      Top             =   840
      Width           =   2370
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackColor       =   &H0000C0C0&
      Caption         =   "Label1"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   1200
      Left            =   3360
      TabIndex        =   0
      Top             =   2040
      Width           =   8130
   End
End
Attribute VB_Name = "Form15"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As Recordset

Private Sub Command1_Click()
rs.MoveFirst
disp
End Sub

Private Sub Command2_Click()
On Error Resume Next
rs.MoveNext
disp
End Sub

Private Sub Command3_Click()
On Error Resume Next
rs.MovePrevious
disp
End Sub

Private Sub Command4_Click()
rs.MoveLast
disp
End Sub

Private Sub Command5_Click()
Unload Me
Form11.Show
End Sub

Private Sub Form_Load()
Label1.Caption = ca
dbcon
Set rs = db.OpenRecordset("Select * from Yellow where category = '" & ca & "'")

If rs.RecordCount <> 0 Then
disp
End If
End Sub

Sub disp()
Label3.Caption = rs(0)
Label5.Caption = rs(2)
Label7.Caption = rs(3)

End Sub

Private Sub Timer1_Timer()
Image4.Picture = VB.LoadPicture(App.Path & "\yellow\p" & Int(Rnd * 25) & ".jpg")

End Sub

⌨️ 快捷键说明

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