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

📄 frmtechs.frm

📁 这是一个实际的工程中所用的源程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmTechs 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "仪表数据"
   ClientHeight    =   1785
   ClientLeft      =   8445
   ClientTop       =   975
   ClientWidth     =   10230
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1785
   ScaleWidth      =   10230
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox picTech 
      Appearance      =   0  'Flat
      BackColor       =   &H80000001&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   1815
      Left            =   0
      ScaleHeight     =   1815
      ScaleWidth      =   10215
      TabIndex        =   0
      Top             =   -30
      Width           =   10215
      Begin 宁波港.Tech Shop2 
         Height          =   405
         Index           =   1
         Left            =   30
         TabIndex        =   1
         Top             =   360
         Width           =   10185
         _ExtentX        =   17701
         _ExtentY        =   714
      End
      Begin 宁波港.Tech Shop2 
         Height          =   405
         Index           =   2
         Left            =   30
         TabIndex        =   2
         Top             =   690
         Width           =   10185
         _ExtentX        =   17701
         _ExtentY        =   714
      End
      Begin 宁波港.Tech Shop2 
         Height          =   405
         Index           =   3
         Left            =   30
         TabIndex        =   3
         Top             =   1050
         Width           =   10185
         _ExtentX        =   17701
         _ExtentY        =   714
      End
      Begin 宁波港.Tech Shop2 
         Height          =   345
         Index           =   4
         Left            =   30
         TabIndex        =   4
         Top             =   1410
         Width           =   10185
         _ExtentX        =   17965
         _ExtentY        =   609
      End
      Begin VB.Label lbls 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "船名"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000E&
         Height          =   210
         Index           =   3
         Left            =   8310
         TabIndex        =   13
         Top             =   60
         Width           =   480
      End
      Begin VB.Label lbls 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "累计"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000E&
         Height          =   210
         Index           =   10
         Left            =   4500
         TabIndex        =   12
         Top             =   60
         Width           =   480
      End
      Begin VB.Label lbls 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "煤种"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000E&
         Height          =   210
         Index           =   9
         Left            =   9540
         TabIndex        =   11
         Top             =   60
         Width           =   480
      End
      Begin VB.Label lbls 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "日期"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000E&
         Height          =   210
         Index           =   0
         Left            =   1110
         TabIndex        =   10
         Top             =   60
         Width           =   480
      End
      Begin VB.Label lbls 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "计量"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000E&
         Height          =   210
         Index           =   1
         Left            =   5580
         TabIndex        =   9
         Top             =   60
         Width           =   480
      End
      Begin VB.Label lbls 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "时间"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000E&
         Height          =   210
         Index           =   4
         Left            =   2190
         TabIndex        =   8
         Top             =   60
         Width           =   480
      End
      Begin VB.Label lbls 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "流量"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000E&
         Height          =   210
         Index           =   6
         Left            =   6750
         TabIndex        =   7
         Top             =   60
         Width           =   480
      End
      Begin VB.Label lbls 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "设定"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000E&
         Height          =   210
         Index           =   5
         Left            =   3330
         TabIndex        =   6
         Top             =   60
         Width           =   480
      End
      Begin VB.Label lbls 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "皮带"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000E&
         Height          =   225
         Index           =   12
         Left            =   180
         TabIndex        =   5
         Top             =   60
         Width           =   480
      End
   End
End
Attribute VB_Name = "frmTechs"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()
Me.Left = GetSetting(App.Title, "frmTechs", "Left", frmMDI.ScaleWidth - Me.Width)
Me.Top = GetSetting(App.Title, "frmTechs", "Top", 480)

    Dim i As Integer
    For i = 1 To CountTechs
        Shop2(i).zInit (i)
    Next i

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
            Select Case UnloadMode
                Case vbAppTaskManager
               Case vbFormControlMenu
                    Cancel = True
                    Me.Hide
'                Case vbFormCode
                
                Case Else
                     Call SaveSetting(App.Title, "frmTechs", "Left", Me.Left)
                     Call SaveSetting(App.Title, "frmTechs", "Top", Me.Top)
            End Select

End Sub

Private Sub Form_Resize()
On Error Resume Next
picTech.Left = 0
picTech.Top = 0
picTech.Width = Me.ScaleWidth
picTech.Height = Me.ScaleHeight


End Sub

'Private Sub picTech_Resize()
'
'Dim FWidth As Single
'Dim FHeight As Single
'Dim VCounts As Integer  '横向数
'Dim HCounts As Integer  '纵向数
'Dim i As Integer
'Dim pWidth   As Long
'Dim pHeight As Long
'Dim SpanW   As Long
'Dim SpanH   As Long
'On Error Resume Next
' FWidth = Shop2(1).Width
' FHeight = Shop2(1).Height '+ Picture2(1).Height
'
' VCounts = 1 '横向数
' HCounts = 4 '纵向数
'pWidth = picTech.ScaleWidth
'pHeight = picTech.ScaleHeight '- ctl流量曲线1.Top
'SpanW = (pWidth - VCounts * FWidth) / (VCounts + 1)
'SpanH = (pHeight - HCounts * FHeight) / (HCounts + 1)
'If SpanW >= 30 Then
''
'    For i = 1 To HCounts
'        Shop2(i).Left = SpanW + (SpanW + FWidth) * 0 ' (i - 1)
'        'Picture2(i).Left = Shop2(i).Left
'    Next i
'    '
'End If
'If SpanH >= 30 Then
'    For i = 1 To HCounts
'       Shop2(i).Top = SpanH + (SpanH + FHeight) * (i - 1)
'       'Picture2(i).Top = SpanH + (SpanH + Shop2(1).Height) * 1
'    Next i
'End If
'End Sub

⌨️ 快捷键说明

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