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

📄 test.frm

📁 该系统为空车计量系统.完成对空车的自动计量.附串口处理程序.
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         Left            =   960
         TabIndex        =   5
         Top             =   840
         Width           =   1212
      End
      Begin VB.Line Line1 
         Index           =   1
         X1              =   960.841
         X2              =   8518.459
         Y1              =   1719.613
         Y2              =   1719.613
      End
      Begin VB.Line Line9 
         Index           =   0
         X1              =   2279.997
         X2              =   2279.997
         Y1              =   1030.62
         Y2              =   2748.797
      End
      Begin VB.Line Line4 
         Index           =   1
         X1              =   3843.365
         X2              =   3843.365
         Y1              =   1719.613
         Y2              =   2751.668
      End
      Begin VB.Line Line8 
         Index           =   0
         X1              =   6245.469
         X2              =   6245.469
         Y1              =   1032.055
         Y2              =   1719.613
      End
      Begin VB.Line Line5 
         Index           =   0
         X1              =   5279.623
         X2              =   5279.623
         Y1              =   1030.62
         Y2              =   2748.797
      End
      Begin VB.Label Label30 
         BackStyle       =   0  'Transparent
         Caption         =   "Label30"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   252
         Index           =   1
         Left            =   2400
         TabIndex        =   4
         Top             =   840
         Width           =   2640
      End
      Begin VB.Label Label14 
         BackStyle       =   0  'Transparent
         Caption         =   "负责人:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   252
         Index           =   0
         Left            =   960
         TabIndex        =   3
         Top             =   2160
         Width           =   996
      End
      Begin VB.Label Label12 
         BackStyle       =   0  'Transparent
         Caption         =   "司  磅 :"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   252
         Index           =   0
         Left            =   4080
         TabIndex        =   2
         Top             =   2160
         Width           =   1212
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "车  号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   252
         Index           =   0
         Left            =   1080
         TabIndex        =   1
         Top             =   1440
         Width           =   852
      End
   End
End
Attribute VB_Name = "test"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim x1 As Integer
Dim x2 As Integer
Dim y1 As Integer
Dim y2 As Integer
Dim dw As Integer
'定义标签参数
Dim cx As Integer
Dim cy As Integer
Dim fsz As Integer

Private Sub dyy()
On Error Resume Next
Dim ii As Integer
Dim lis As Object
Dim name1 As String
Dim g As String
g = "lin"
Dim Found, MyObject, MyCollection
'Printer.NewPage
Found = False   ' 设置变量初始值。
For Each MyObject In Me
' 对每个成员作一次迭代。
name1 = MyObject.Name
   'If InStr(1, MyObject.Name, "lin") > 0 Then ' 如果 Text 属性值等于“Hello”。)
     If MyObject.BorderStyle > 0 Then
     'If MyObject Is Line Then
     
     x1 = MyObject.x1
      x2 = MyObject.x2
     y1 = MyObject.y1
     y2 = MyObject.y2
          dw = MyObject.BorderWidth
          Printer.DrawWidth = dw
     Printer.Line (x1, y1)-(x2, y2)
     'Debug.Print MyObject.Name, x1, x2, y1, y2
     
         Else
     x1 = MyObject.Left
     y1 = MyObject.top
        Printer.Font.Size = MyObject.Font.Size
     Printer.CurrentX = x1
     Printer.CurrentY = y1
   
     Printer.Print MyObject.Caption
     
     
       'Exit For   ' 退出循环。
   End If
   x1 = 0: x2 = 0: y1 = 0: y2 = 0
   
20:
Next
'Form2.Show
Printer.EndDoc
'Printer.NewPage
End Sub
'CODE Manger By BcodeXRose
'##################################################################
'## 过程名称:Command3_Click
'## 参数: 无
'##################################################################
Private Sub Command3_Click()
    
    On Error Resume Next
    Printer.Width = Me.Picture1.Width
    Printer.Height = Me.Picture1.Height
Dim ii As Integer
Dim lis As Object
Dim name1 As String

Dim g As String
g = "lin"
Dim Found, MyObject, MyCollection

Found = False   ' 设置变量初始值。
For Each MyObject In Me
' 对每个成员作一次迭代。
name1 = MyObject.Name
   'If InStr(1, MyObject.Name, "lin") > 0 Then ' 如果 Text 属性值等于“Hello”。)
     If MyObject.BorderStyle > 0 Then
     'If MyObject Is Line Then
     x1 = MyObject.x1
     x2 = MyObject.x2
     y1 = MyObject.y1
     y2 = MyObject.y2
     dw = MyObject.BorderWidth
     Printer.DrawWidth = dw
     Printer.Line (x1, y1)-(x2, y2)
        Else
     x1 = MyObject.Left
     y1 = MyObject.top
        Printer.Font.Size = MyObject.Font.Size
     Printer.CurrentX = x1
     Printer.CurrentY = y1
   
     Printer.Print MyObject.Caption
    ' Printer.PaintPicture Me.Picture1.Picture, 0, 0
     
      End If
   x1 = 0: x2 = 0: y1 = 0: y2 = 0
   
20:
Next
'Form3.Show
Printer.EndDoc

End Sub
    
'##################################################################
'## 过程名称:Command4_Click
'## 参数:Index 为Integer型
'##################################################################
Private Sub Command4_Click(Index As Integer)
    Unload test
End Sub
    
'##################################################################
'## 过程名称:Form_Load
'## 参数: 无
'##################################################################
Private Sub Form_Load()
    On Error Resume Next
    For i = 0 To 1
        Label1(i) = jl_qym & "空车过磅单"
        Label15(i).Caption = Form1.Label11.Caption
       ' Label9(i).Caption = Form1.Label13.Caption
        Label18(i).Caption = jl_pz
        Label23(i).Caption = Form1.Label18.Caption
        Label10(i).Caption = Form1.Label14.Caption
        Label25(i).Caption = Form1.Label17.Caption
        Label30(i).Caption = Format(Now, "yyyy年mm月dd日hh时mm分")
        
    Next i
    'test.Show
     Form_Resize
End Sub
    
Private Sub Form_Resize()
On Error Resume Next
Me.HScroll1.Max = Me.Picture1.Width - Me.Width
Me.VScroll1.Max = Me.Picture1.Height - Me.Height
Me.HScroll1.top = Me.Height - Me.HScroll1.Height - Me.Toolbar1.Height - 200
Me.VScroll1.Left = Me.ScaleWidth - 600
Me.VScroll1.Height = Me.Height - Me.HScroll1.Height
Me.HScroll1.Width = Me.Width - 600
End Sub

'##################################################################
'## 过程名称:Form_Unload
'## 参数:Cancel 为Integer型
'##################################################################
Private Sub Form_Unload(Cancel As Integer)
    jl_pz1 = 0
    jl_pz = 0
    ''jl_zg = 0
    '‘mainfrm.Picture1.Visible = True
End Sub
    
    
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
 Case 1
 Command3_Click
 'Call PrintBarCode(Printer, strBarCode, 66, 37, 9, True)
   ' Call PrintBarCode(Printer, strBarCode, 66, 105, 9, True)
    'Call PrintBarCode(Printer, strBarCode, 66, 180, 9, True)
   
 Case 2
 Unload Me
 End Select
End Sub

Private Sub VScroll1_Change()
Me.Picture1.top = -Me.VScroll1.Value + Me.Toolbar1.Height
End Sub

Private Sub VScroll1_Scroll()
Me.Picture1.top = -Me.VScroll1.Value + Me.Toolbar1.Height

End Sub

⌨️ 快捷键说明

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