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

📄 form1.frm

📁 此为vb6做的报表打印控件源码
💻 FRM
字号:
VERSION 5.00
Object = "{A803CB78-8B54-11D2-A76D-0000E8D03F44}#2.4#0"; "DYCONTROL.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4815
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6405
   LinkTopic       =   "Form1"
   ScaleHeight     =   4815
   ScaleWidth      =   6405
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "Command3"
      Height          =   525
      Left            =   2610
      TabIndex        =   3
      Top             =   5700
      Width           =   1455
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   465
      Left            =   7020
      TabIndex        =   2
      Top             =   5820
      Width           =   1365
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   495
      Left            =   5250
      TabIndex        =   1
      Top             =   5850
      Width           =   1095
   End
   Begin dyM1Grid.dyM1Report dyM1Report1 
      Height          =   5265
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   8745
      _ExtentX        =   15425
      _ExtentY        =   9287
      OutlineBar      =   1
      OutlineCol      =   1
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    
    dyM1Report1.subPrintPreview True
End Sub

Private Sub Command2_Click()
'    Dim db As Database
'    Dim rs As Recordset
'    Dim ws As Workspace
'    Set ws = DBEngine.Workspaces(0)
'    Set db = ws.OpenDatabase("Hospital26", dbDriverPrompt, True, "ODBC;uid=sa;pwd=sa;dsn=Hospital26")
'    Set rs = db.OpenRecordset("select * from 用户管理_系统对象属性表", dbOpenSnapshot)
'    Set dyM1Report1.Recordset = rs
Dim i As Long
Dim j As Long
With dyM1Report1
    .Cols = 24
    .Rows = 20
    .SubTitles = "fdsajkfasdkljfdsklajdfsakljfkljasd|jsdakflakds|fdaksdfkjasd|sfdjfdsa"
    For i = 1 To .Cols - 1
     For j = 1 To .Rows - 1
        .TextMatrix(j, i) = "抱君黄金台上意" & Str(i)
     Next
     
    Next
End With
End Sub

Private Sub Command3_Click()
    dyM1Report1.subPrint
End Sub

⌨️ 快捷键说明

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