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

📄 form5.frm

📁 打印方面的程序
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         BeginProperty Column01 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1395.213
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   494.929
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   1200.189
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   1005.165
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   1200.189
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   1200.189
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   1200.189
         EndProperty
         BeginProperty Column09 
            ColumnWidth     =   794.835
         EndProperty
         BeginProperty Column10 
            ColumnWidth     =   794.835
         EndProperty
         BeginProperty Column11 
            ColumnWidth     =   794.835
         EndProperty
         BeginProperty Column12 
            ColumnWidth     =   794.835
         EndProperty
         BeginProperty Column13 
            ColumnWidth     =   494.929
         EndProperty
         BeginProperty Column14 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column15 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column16 
            Object.Visible         =   0   'False
            ColumnWidth     =   915.024
         EndProperty
         BeginProperty Column17 
            Object.Visible         =   0   'False
            ColumnWidth     =   2085.166
         EndProperty
      EndProperty
   End
   Begin VB.Frame Frame1 
      Height          =   1095
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   10815
      Begin VB.CommandButton Command4 
         Caption         =   "全部记录"
         Height          =   375
         Left            =   7800
         TabIndex        =   7
         Top             =   400
         Width           =   1095
      End
      Begin VB.CommandButton Command3 
         Caption         =   "退出"
         Height          =   375
         Left            =   9240
         TabIndex        =   6
         Top             =   400
         Width           =   1095
      End
      Begin VB.CommandButton Command2 
         Caption         =   "打印"
         Enabled         =   0   'False
         Height          =   375
         Left            =   6240
         TabIndex        =   5
         Top             =   400
         Width           =   1215
      End
      Begin VB.CommandButton Command1 
         Caption         =   "查询"
         Height          =   375
         Left            =   4680
         TabIndex        =   4
         Top             =   400
         Width           =   1215
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   2400
         TabIndex        =   3
         Top             =   400
         Width           =   1815
      End
      Begin VB.Label Label1 
         Caption         =   "请输入物品的名称:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   2
         Top             =   480
         Width           =   2295
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   2280
      Top             =   6720
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   873
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      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
   Begin MSAdodcLib.Adodc Adodc3 
      Height          =   495
      Left            =   3000
      Top             =   6600
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   873
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      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         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc2"
      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 = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim px As New PrinterControl
Dim str_tem As String

Private Sub Command1_Click()
If Text1.Text <> "" Then
      Adodc1.ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & curpath + "wupin.mdb;Persist Security Info=False"
      Adodc1.CommandType = adCmdText
      Dim str As String
      str = "select * from wupin where " & str_wpcx & " like '%" & Trim(Text1.Text) & "%'"
      str_tem = str
      Adodc1.RecordSource = str

      Adodc1.Refresh
      Command2.Enabled = True
End If

End Sub


Private Sub Command2_Click()

 Dim PageDirection As Integer
 PageDirection = 2
 Call SetOrientation(DMDUP_SIMPLEX, PageDirection)



  Adodc1.ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & curpath + "wupin.mdb;Persist Security Info=False"
  Adodc1.RecordSource = str_tem
   Adodc1.CommandType = adCmdText
  Adodc1.Refresh

    If Adodc1.Recordset.RecordCount < 1 Then
      Exit Sub
    End If
    Set DataReport1.DataSource = Adodc1.Recordset
    
DataReport1.Caption = "山东科技大学物品管系统"
DataReport1.Show
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Command4_Click()

      Adodc1.ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & curpath + "wupin.mdb;Persist Security Info=False"
      Adodc1.CommandType = adCmdText
      str_tem = "select * from wupin "
      Adodc1.RecordSource = "select * from wupin "

      Adodc1.Refresh
      Command2.Enabled = True
End Sub

Private Sub Form_Load()

If Right(App.path, 1) = "\" Then ' 若 App.Path 为根目录
curpath = App.path
Else
curpath = App.path + "\"
End If


End Sub

⌨️ 快捷键说明

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