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

📄 baobiao.frm

📁 此系统实现了火车票订票系统的部分功能
💻 FRM
字号:
VERSION 5.00
Begin VB.Form baobiao 
   Caption         =   "打印预览"
   ClientHeight    =   5940
   ClientLeft      =   60
   ClientTop       =   405
   ClientWidth     =   7440
   LinkTopic       =   "Form4"
   ScaleHeight     =   5940
   ScaleWidth      =   7440
   StartUpPosition =   3  'Windows Default
   Begin VB.Label report 
      Caption         =   "Label2"
      Height          =   4815
      Left            =   0
      TabIndex        =   1
      Top             =   1080
      Width           =   8415
   End
   Begin VB.Line Line2 
      X1              =   0
      X2              =   7920
      Y1              =   960
      Y2              =   960
   End
   Begin VB.Line Line1 
      X1              =   0
      X2              =   7920
      Y1              =   840
      Y2              =   840
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "出租车信息报表"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2160
      TabIndex        =   0
      Top             =   120
      Width           =   3015
   End
End
Attribute VB_Name = "baobiao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn As New ADODB.Connection
Dim RST As ADODB.Recordset
Dim cmd As ADODB.Command
Private Sub Form_Load()
 Dim ConnectString As String
   Set conn = New ADODB.Connection
   ConnectString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;" _
   & "Persist Security Info=False;Initial Catalog=陈念;" _
   & "Data Source=3302A68391D44A0"
   conn.CursorLocation = adUseClient
   conn.Open ConnectString
  report.Caption = "               身份证            " _
                 & "          姓名        " _
                 & "          车次       " _
                 & "          乘车日期         " _
                 & "          票数       " _
                 & vbNewLine
  report.Caption = report.Caption _
                 & "               ----------            " _
                 & "          ------------        " _
                 & "       --------------         " _
                 & "      ---------------             " _
                 & "      ----------         "
  Dim RST As New ADODB.Recordset
  Set RST = conn.Execute("exec breport")
  While RST.EOF = False
     report.Caption = report.Caption & vbNewLine & vbNewLine _
                 & "                  " & RST.Fields(0) & "            " _
                 & "                " & RST.Fields(1) & "          " _
                 & "          " & RST.Fields(2) & "       " _
                 & "          " & RST.Fields(3) & "         " _
                 & "           " & RST.Fields(4) & "       "
     RST.MoveNext
   Wend
End Sub

Private Sub Form_Unload(Cancel As Integer)
 conn.Close
End Sub

⌨️ 快捷键说明

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