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

📄 printdemo.frm

📁 windows下测试打印机源码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Width           =   1560
      End
      Begin VB.Label ADAType1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "优惠顾客"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   11.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   225
         Left            =   3675
         TabIndex        =   8
         Top             =   495
         Visible         =   0   'False
         Width           =   900
      End
      Begin VB.Label lbl_01 
         BackStyle       =   0  'Transparent
         Caption         =   "姓名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Index           =   0
         Left            =   945
         TabIndex        =   6
         Top             =   240
         Width           =   3255
      End
      Begin VB.Label lbl_01 
         BackStyle       =   0  'Transparent
         Caption         =   "号码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   1
         Left            =   945
         TabIndex        =   5
         Top             =   495
         Width           =   3765
      End
      Begin VB.Label lbl_01 
         BackStyle       =   0  'Transparent
         Caption         =   "有效期至"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Index           =   3
         Left            =   945
         TabIndex        =   4
         Top             =   1005
         Width           =   1395
      End
      Begin VB.Label lbl_01 
         BackStyle       =   0  'Transparent
         Caption         =   "所属店铺"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Index           =   4
         Left            =   945
         TabIndex        =   3
         Top             =   1260
         Width           =   2775
      End
      Begin VB.Label lbl_01 
         BackStyle       =   0  'Transparent
         Caption         =   "申请日期"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Index           =   2
         Left            =   945
         TabIndex        =   2
         Top             =   750
         Width           =   3765
      End
   End
   Begin VB.Label LblSRPC 
      BackStyle       =   0  'Transparent
      Caption         =   "SRPC"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   120
      TabIndex        =   32
      Top             =   11040
      Width           =   5295
   End
   Begin VB.Label lblSR 
      BackColor       =   &H00FFFFFF&
      Caption         =   "安利公司有权将不符合要求的销售代表视同优惠顾客"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   5805
      TabIndex        =   31
      Top             =   11445
      Width           =   5445
   End
   Begin VB.Label lblSR1 
      BackColor       =   &H00FFFFFF&
      Caption         =   "持卡人身份以安利公司电脑系统记载为准"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   5805
      TabIndex        =   30
      Top             =   11100
      Width           =   5445
   End
   Begin VB.Label lblVoid 
      AutoSize        =   -1  'True
      BackColor       =   &H00FFFFFF&
      Caption         =   "作 废"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   6315
      TabIndex        =   27
      Top             =   16245
      Visible         =   0   'False
      Width           =   1140
   End
   Begin VB.Label lblFont 
      BackStyle       =   0  'Transparent
      Caption         =   "宋体"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   11.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3495
      TabIndex        =   7
      Top             =   11955
      Visible         =   0   'False
      Width           =   3135
   End
End
Attribute VB_Name = "PrintDemo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

'Private Function Name_Convert(Optional strP As String = "") As String
'    Dim lngStr As Long
'    On Error GoTo ErrorHandle
'    If strP = "" Then
'        Name_Convert = ""
'        Exit Function
'    End If
'    lngStr = InStr(1, strP, "&")
'    If lngStr < 1 Then
'          Name_Convert = strP
'    Else
'          Name_Convert = Left(strP, lngStr - 1) & "&" & Mid(strP, lngStr, 100)
'    End If
'    Exit Function
'ErrorHandle:
'    Name_Convert = strP
'
'End Function

Private Sub Form_Load()
    On Error Resume Next
    
    Me.Height = 23000
    Me.Width = 12000
    Me.Left = 0
    Me.Top = 0
    Me.picInf(0).Left = gettop_car_x()
    Me.picInf(0).Top = gettop_car_y()
    Me.picInf(1).Left = getleft_car_x()
    Me.picInf(1).Top = getleft_car_y()
    Me.picInf(2).Left = getright_car_x()
    Me.picInf(2).Top = getright_car_y()
    
    
'    Report_Open
    Me.Enabled = False
'    Printer.PaperBin = intPrintADAPaperBin
    Me.PrintForm
    
 
End Sub

Private Function openReport() As Boolean
    Dim i As Integer
    For i = 0 To 10
      lbl_00(i).Caption = "发卡店铺:" + getstrshopname()
    Next
    lblPOS.Caption = "POS: " & getstrpos()
    lblADANo.Caption = getstradano() & vbCrLf & getstradaname()
    For i = 0 To 4
        lbl_01(i).FontBold = True
        lbl_01(i).FontSize = 11
        lbl_01(i).FontName = lblFont.Caption
        lbl_02(i).FontBold = True
        lbl_02(i).FontSize = 11
        lbl_02(i).FontName = lblFont.Caption
    Next i
    Me.lbl_01(0).Caption = getstradaname()
    Me.lbl_01(1).Caption = getstradano()
    Me.lbl_01(2).Caption = getstrbegindate()
    Me.lbl_01(3).Caption = getstrenddate()
    Me.lbl_01(4).Caption = Trim(getstrshopname()) & "(" & Trim(getstrshopno()) & ")"

    Me.lbl_02(0).Caption = getstradaname()
    Me.lbl_02(1).Caption = getstradano()
    Me.lbl_02(2).Caption = getstrbegindate()
    Me.lbl_02(3).Caption = getstrenddate()
    Me.lbl_02(4).Caption = Trim(getstrshopname()) & "(" & Trim(getstrshopno()) & ")"
    
    If getstrdsttype() = "P" Then
      Me.ADAType1.Visible = False   '所有顾客都不显示身份,9.1新政策 - 2005.8.25 ver 3.08
      Me.ADAType2.Visible = False   '所有顾客都不显示身份,9.1政策 - 2005.8.25 ver 3.08
      'PC打印所属店铺 - add by joyce 2003.8.19
      Me.lbl_01(4).Visible = False  'PC不打印所属店铺 - 2004.4.7
      Me.lbl_02(4).Visible = False  'PC不打印所属店铺 - 2004.4.7
    Else
      Me.ADAType1.Visible = False
      Me.ADAType2.Visible = False
      'SR/AA/EE不打印所属店铺 - add by joyce 2003.8.19
      Me.lbl_01(4).Visible = False
      Me.lbl_02(4).Visible = False
    End If

    'add by joyce - 2005.8.25
    Me.lblSR1.Visible = True
    If getstrdsttype() = "P" Then
      Me.lblSR1.Visible = False
      Me.lblSR.Visible = False
    Else
      Me.lblSR1.Visible = True
      Me.lblSR.Visible = True
    End If


    '如不是夫妇,则只打印左边的ADA卡 - Add by Joyce (2002.6.24)
    If getstrspouseflag() Then
      lblVoid.Visible = False
    Else
      lblVoid.Visible = True
      lblVoid.Top = picInf(2).Top + 1300
      lblVoid.Left = picInf(2).Left + 1500
      picInf(2).Visible = False
    End If
    
    Me.LblSRPC.Caption = getstrinformation()

End Function

'Private Sub Report_Open()
'  Dim strDstType As String
'  Dim RptRs As New ADODB.Recordset
'  Dim i As Integer
'  Dim strName1 As String
'  Dim strName2 As String
'
'  On Error Resume Next
'  RptRs.Open "select * from adacard", cnABOSPRM
'  With RptRs
'    For i = 0 To 10
'      lbl_00(i).Caption = "发卡店铺:" + Trim(gCentreControl.CentreName)
'    Next
'    lblPOS.Caption = "POS: " & gPosControl.POSNUM
'    lblADANo.Caption = RptRs("dstada") & vbCrLf & RptRs("dstnam1") & " " & RptRs("dstnam2")
'    For i = 0 To 4
'        lbl_01(i).FontBold = True
'        lbl_01(i).FontSize = 11
'        lbl_01(i).FontName = lblFont.Caption
'        lbl_02(i).FontBold = True
'        lbl_02(i).FontSize = 11
'        lbl_02(i).FontName = lblFont.Caption
'    Next i
'    strName1 = Name_Convert(Trim(.Fields("dstnam1").Value))
'    strName2 = Name_Convert(Trim(.Fields("dstnam2").Value))
'    Me.lbl_01(0).Caption = strName1 & " " & strName2
'    Me.lbl_01(1).Caption = Trim(.Fields("dstADA").Value) + Trim(.Fields("strkey")) + vbLf
'    Me.lbl_01(2).Caption = Trim(.Fields("AppDte").Value)
'    Me.lbl_01(3).Caption = Trim(.Fields("dstdte").Value)
'    Me.lbl_01(4).Caption = Trim(gCentreControl.CentreName) & "(" & Trim(gPosControl.CentreNum) & ")"
'    If Val(.Fields("barADA").Value) > 99999999 Then
'      Me.Barcode1.Text = Val(Trim(.Fields("barADA").Value))
'    Else
'      Me.Barcode1.Text = Right(Trim(.Fields("barADA").Value), 8)
'    End If
'
'    Me.lbl_02(0).Caption = strName1 & " " & strName2
'    Me.lbl_02(1).Caption = Trim(.Fields("dstADA").Value) + Trim(.Fields("strkey")) + vbLf
'    Me.lbl_02(2).Caption = Trim(.Fields("AppDte").Value)
'    Me.lbl_02(3).Caption = Trim(.Fields("dstdte").Value)
'    Me.lbl_02(4).Caption = Trim(gCentreControl.CentreName) & "(" & Trim(gPosControl.CentreNum) & ")"
'    If Val(.Fields("barADA").Value) > 99999999 Then
'      Me.Barcode2.Text = Val(Trim(.Fields("barADA").Value))
'    Else
'      Me.Barcode2.Text = Right(Trim(.Fields("barADA").Value), 8)
'    End If
'
'    If Trim(.Fields("dsttyp")) = "P" Then
'      Me.ADAType1.Visible = False   '所有顾客都不显示身份,9.1新政策 - 2005.8.25 ver 3.08
'      Me.ADAType2.Visible = False   '所有顾客都不显示身份,9.1政策 - 2005.8.25 ver 3.08
'      'PC打印所属店铺 - add by joyce 2003.8.19
'      Me.lbl_01(4).Visible = False  'PC不打印所属店铺 - 2004.4.7
'      Me.lbl_02(4).Visible = False  'PC不打印所属店铺 - 2004.4.7
'    Else
'      Me.ADAType1.Visible = False
'      Me.ADAType2.Visible = False
'      'SR/AA/EE不打印所属店铺 - add by joyce 2003.8.19
'      Me.lbl_01(4).Visible = False
'      Me.lbl_02(4).Visible = False
'    End If
'
'    'add by joyce - 2005.8.25
'    Me.lblSR1.Visible = True
'    If Trim(.Fields("dsttyp")) = "P" Then
'      Me.lblSR1.Visible = False
'      Me.lblSR.Visible = False
'    Else
'      Me.lblSR1.Visible = True
'      Me.lblSR.Visible = True
'    End If
'
'
'    '如不是夫妇,则只打印左边的ADA卡 - Add by Joyce (2002.6.24)
'    If Trim(.Fields("dstnam2")) <> "" Or RptRs("bldsr") = "Y" Then
'      lblVoid.Visible = False
'    Else
'      lblVoid.Visible = True
'      lblVoid.Top = picInf(2).Top + 1300
'      lblVoid.Left = picInf(2).Left + 1500
'      picInf(2).Visible = False
'    End If
'
'    'Bruce modified on 4/4/06 for sr down grade pc message
'    SRTOPC
'    '**************************************************
'
'  End With
'
'
'
'End Sub
'
'Function SRTOPC() As Boolean
'Dim ts As String
'
'    On Error GoTo ErrorHandle
'    If Trim(Fmtrenew.Text8.Text) <> "" And Trim(Fmtrenew.Text8.Text) <> "P" Then
'        ts = "SRRENEW"
'        ts = LoadPRMDSC("RENEW", ts, "RSVSTR1") & LoadPRMDSC("RENEW", ts, "RSVSTR2") & LoadPRMDSC("RENEW", ts, "RSVSTR3")
'
'        Me.LblSRPC.Caption = ts
'    Else
'        Me.LblSRPC.Caption = ""
'    End If
'
'    Exit Function
'ErrorHandle:
'
'
'End Function
'
'
'

⌨️ 快捷键说明

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