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

📄 gdhmain.frm

📁 齐鲁石化某分公司的数据采集管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form gdhMain 
   ClientHeight    =   8340
   ClientLeft      =   165
   ClientTop       =   825
   ClientWidth     =   10635
   Icon            =   "gdhMain.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   8340
   ScaleWidth      =   10635
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   1
      Top             =   7965
      Width           =   10635
      _ExtentX        =   18759
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   4
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            Text            =   "状态"
            TextSave        =   "2008-1-22"
            Key             =   "state"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            TextSave        =   "12:45"
            Key             =   "time"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            TextSave        =   "2008-1-22"
            Key             =   "date"
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
            Text            =   "登录人:"
            TextSave        =   "登录人:"
            Key             =   "operator"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   840
      Top             =   3240
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   18
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":030A
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":2C9C
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":2FB6
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":32D0
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":35EA
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":62F4
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":7A86
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":A790
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":D49A
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":E5E4
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":EB7E
            Key             =   ""
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":F590
            Key             =   ""
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":F8AA
            Key             =   ""
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":FBC4
            Key             =   ""
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":FEDE
            Key             =   ""
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":12BE8
            Key             =   ""
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":158F2
            Key             =   ""
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "gdhMain.frx":185FC
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   690
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   10635
      _ExtentX        =   18759
      _ExtentY        =   1217
      ButtonWidth     =   1667
      ButtonHeight    =   1058
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   7
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "实时称重  "
            Key             =   "weight"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "数据编辑"
            Key             =   "nontimeweight"
            ImageIndex      =   14
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "编辑"
            Key             =   "edits"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "汇总"
            Key             =   "huizong"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "词库"
            Key             =   "words"
            ImageIndex      =   9
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "计规"
            Key             =   "jigui"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出"
            Key             =   "quit"
            ImageIndex      =   4
         EndProperty
      EndProperty
   End
   Begin VB.Image Image1 
      Height          =   11520
      Left            =   0
      Picture         =   "gdhMain.frx":1B306
      Top             =   600
      Width           =   15360
   End
   Begin VB.Menu cd1 
      Caption         =   "管理设置"
      Begin VB.Menu AddOperator 
         Caption         =   "添加操作员"
      End
      Begin VB.Menu AmendPassword 
         Caption         =   "修改密码"
      End
   End
   Begin VB.Menu cd2 
      Caption         =   "打印设置"
      Begin VB.Menu contentset 
         Caption         =   "内容设置"
      End
      Begin VB.Menu templateset 
         Caption         =   "模板设置"
      End
   End
   Begin VB.Menu cd3 
      Caption         =   "系统功能"
      Begin VB.Menu startWeight 
         Caption         =   "启动称重"
      End
      Begin VB.Menu QuitSystem 
         Caption         =   "退出系统"
      End
   End
End
Attribute VB_Name = "gdhMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim ObjSystem As Object
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)


Private Sub AddOperator_Click()
    Me.Enabled = False
    gdhOperator.Show
End Sub

Private Sub AmendPassword_Click()
    Me.Enabled = False
    gdhAmendPass.Show
End Sub

Private Sub contentset_Click()
    Me.Enabled = False
    gdhPrintField.Show
End Sub

Private Sub Form_Load()
    Set ObjSystem = CreateObject("Scripting.FileSystemObject")
    Call Configs
    Call Initialize_
    Call setPage
End Sub

Function Initialize_()

    StatusBar1.Panels(4).text = StatusBar1.Panels(4).text & Usering_Name
    Me.Caption = "轨道衡称重管理系统"
    
    If AdminIF = True Then
        AddOperator.Enabled = True
    Else
        AddOperator.Enabled = False
    End If
    
    If SuperAdmin = True Then
        cd2.Visible = True
    Else
        cd2.Visible = False
    End If
End Function

Function Configs()
    Dim strvalue As String
    Dim tt As Integer
    Dim str_FilePath As String
    
    str_FilePath = App.Path & "\editconfig.ini"
    
    'access数据库存放路径
    strvalue = GetKeyValue(str_FilePath, "path", "dbpath", "")
    If strvalue = "" Then
        gdh_DB_Path = App.Path
    Else
        gdh_DB_Path = strvalue
    End If
    If Right$(gdh_DB_Path, 1) <> "\" Then
        gdh_DB_Path = gdh_DB_Path + "\"
    End If
    
    
End Function

Private Sub Form_Unload(Cancel As Integer)
    On Error Resume Next
    Unload gdhWeight
    Unload gdhEdits
    Unload gdhHuiZong
    Unload gdhPrint
    
End Sub

Function GetKeyValue(str_FilePath As String, Section As String, key As String, secondValue As String) As String
    Dim Value As String
    Dim t As Long
    On Error GoTo ok
    
    Value = String(255, " ")
    t = GetPrivateProfileString(Section, key, secondValue, Value, 255, str_FilePath)
    Value = Trim(Value)
    GetKeyValue = Mid(Value, 1, Len(Value) - 1)
ok:
End Function

Private Sub QuitSystem_Click()
    Unload Me
End Sub

Private Sub startWeight_Click()
    gdhWeight.Show
End Sub

Private Sub templateset_Click()
    Me.Enabled = False
    gdhTemplate.Show
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.key
        Case "weight"
           ' gdhWeight.Show
           Shell App.Path & "\gdh.exe"
        Case "nontimeweight"
             gdhWeight.Show
        Case "edits"
            gdhEdits.Show
        Case "huizong"
            gdhHuiZong.Show
        Case "words"
            gdhWord.Show
        Case "jigui"
            gdhTrainrule.Show
        Case "quit"
            Unload Me
        Case Else
        
    End Select
End Sub

Function setPage()
    Dim i As Integer, j As Integer
    Dim SSection As String
    Dim SKey As String
    Dim strReturn As String
    Dim IniFilePath As String
    
    IniFilePath = App.Path & "\pageset.ini"
    If ObjSystem.FileExists(IniFilePath) = False Then Exit Function
    SSection = "page"
    For i = 1 To 13
        SKey = "page" & i
        strReturn = GetKeyValue(IniFilePath, SSection, SKey, "009---50 ")
        If Len(strReturn) < 6 Then strReturn = "009---50 "
        PageType(i).PNumber = Int(Val(Mid(strReturn, 1, 3)))
        PageType(i).PCount = Int(Val(Mid(strReturn, 7, 3)))
    Next i
    
End Function

⌨️ 快捷键说明

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