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

📄 ddc设置.frm

📁 酒店管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
               Left            =   120
               ScaleHeight     =   975
               ScaleWidth      =   4695
               TabIndex        =   29
               Top             =   240
               Width           =   4695
               Begin VB.CommandButton Command4 
                  Caption         =   "缓冲区<<模块"
                  Height          =   375
                  Left            =   1320
                  TabIndex        =   32
                  Top             =   480
                  Width           =   1455
               End
               Begin VB.CommandButton Command3 
                  Caption         =   "缓冲区>>模块"
                  Height          =   375
                  Left            =   3000
                  TabIndex        =   31
                  Top             =   480
                  Width           =   1455
               End
               Begin MSComctlLib.ProgressBar ProgressBar1 
                  Height          =   195
                  Left            =   1320
                  TabIndex        =   30
                  Top             =   120
                  Width           =   3135
                  _ExtentX        =   5530
                  _ExtentY        =   344
                  _Version        =   393216
                  BorderStyle     =   1
                  Appearance      =   0
                  Max             =   50
                  Scrolling       =   1
               End
               Begin VB.Label Label4 
                  BackStyle       =   0  'Transparent
                  Caption         =   "进度: 0%"
                  Height          =   255
                  Left            =   240
                  TabIndex        =   33
                  Top             =   120
                  Width           =   1095
               End
            End
         End
         Begin VB.Frame Frame8 
            Caption         =   "模块号:"
            Height          =   975
            Left            =   120
            TabIndex        =   3
            Top             =   120
            Width           =   4935
            Begin VB.PictureBox Picture6 
               BorderStyle     =   0  'None
               Height          =   615
               Left            =   120
               ScaleHeight     =   615
               ScaleWidth      =   4695
               TabIndex        =   50
               Top             =   240
               Width           =   4695
               Begin VB.CommandButton Command10 
                  Caption         =   "写DDC地址"
                  Height          =   375
                  Left            =   2160
                  TabIndex        =   53
                  Top             =   120
                  Width           =   1095
               End
               Begin VB.CommandButton Command6 
                  Caption         =   "通讯测试"
                  Height          =   375
                  Left            =   3360
                  TabIndex        =   52
                  Top             =   120
                  Width           =   1095
               End
               Begin VB.TextBox Text1 
                  Height          =   270
                  Left            =   1440
                  TabIndex        =   51
                  Text            =   "1"
                  Top             =   200
                  Width           =   615
               End
               Begin VB.Label Label1 
                  BackStyle       =   0  'Transparent
                  Caption         =   "范围:1~250"
                  Height          =   255
                  Left            =   240
                  TabIndex        =   54
                  Top             =   240
                  Width           =   1215
               End
            End
         End
      End
   End
   Begin VB.Frame Frame7 
      Caption         =   "缓冲区"
      Height          =   9015
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   6255
      Begin VB.PictureBox Picture7 
         BorderStyle     =   0  'None
         Height          =   8655
         Left            =   120
         ScaleHeight     =   8655
         ScaleWidth      =   6015
         TabIndex        =   55
         Top             =   240
         Width           =   6015
         Begin VB.CommandButton Command8 
            Caption         =   "缓冲区<< 文件"
            Height          =   375
            Left            =   2400
            TabIndex        =   57
            Top             =   8160
            Width           =   1575
         End
         Begin VB.CommandButton Command9 
            Caption         =   "缓冲区>> 文件"
            Height          =   375
            Left            =   4200
            TabIndex        =   56
            Top             =   8160
            Width           =   1575
         End
         Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
            Height          =   6135
            Left            =   10
            TabIndex        =   58
            Top             =   120
            Width           =   5775
            _ExtentX        =   10186
            _ExtentY        =   10821
            _Version        =   393216
            ForeColor       =   4194304
            ForeColorFixed  =   4194304
            GridColorFixed  =   32896
            ScrollTrack     =   -1  'True
            GridLinesFixed  =   1
            BorderStyle     =   0
            Appearance      =   0
            FormatString    =   ""
         End
         Begin VB.Shape Shape2 
            BorderColor     =   &H00008080&
            Height          =   6160
            Left            =   0
            Top             =   100
            Width           =   6015
         End
         Begin VB.Shape Shape1 
            BorderColor     =   &H80000001&
            Height          =   1695
            Left            =   0
            Top             =   6360
            Width           =   6015
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=10""星期日有效"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   10
            Left            =   2280
            TabIndex        =   71
            Top             =   7440
            Width           =   1695
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=9""星期6,7有效"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   9
            Left            =   480
            TabIndex        =   70
            Top             =   7440
            Width           =   1575
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=8""星期2,4,6有效"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   8
            Left            =   3960
            TabIndex        =   69
            Top             =   7200
            Width           =   1815
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=7""星期2,4有效"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   7
            Left            =   2280
            TabIndex        =   68
            Top             =   7200
            Width           =   1695
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=6""星期1,3,5有效"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   6
            Left            =   480
            TabIndex        =   67
            Top             =   7200
            Width           =   1815
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=5""星期0-6有效"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   5
            Left            =   3960
            TabIndex        =   66
            Top             =   6960
            Width           =   1575
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=4""星期1-6有效"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   4
            Left            =   2280
            TabIndex        =   65
            Top             =   6960
            Width           =   1575
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=3""星期1-5有效"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   3
            Left            =   480
            TabIndex        =   64
            Top             =   6960
            Width           =   1575
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=2""全天开启"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   2
            Left            =   3960
            TabIndex        =   63
            Top             =   6720
            Width           =   1335
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=1""全天关闭"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   1
            Left            =   2280
            TabIndex        =   62
            Top             =   6720
            Width           =   1335
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "=0""本条无效"""
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   0
            Left            =   480
            TabIndex        =   61
            Top             =   6720
            Width           =   1335
         End
         Begin VB.Label Label3 
            BackStyle       =   0  'Transparent
            Caption         =   "注:系统的模式设置范围为0-10,各数值定义如下:"
            ForeColor       =   &H00800000&
            Height          =   255
            Left            =   120
            TabIndex        =   60
            Top             =   6480
            Width           =   5655
         End
         Begin VB.Label Label10 
            BackStyle       =   0  'Transparent
            Caption         =   "以上模式0-2不受时间的控制,3-10受用户设置的时间控制。"
            ForeColor       =   &H00800000&
            Height          =   255
            Left            =   120
            TabIndex        =   59
            Top             =   7680
            Width           =   5655
         End
      End
   End
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   6240
      Top             =   1920
   End
   Begin VB.PictureBox MSComm2 
      Height          =   480
      Left            =   6120
      ScaleHeight     =   420
      ScaleWidth      =   1140
      TabIndex        =   8
      Top             =   2400
      Visible         =   0   'False
      Width           =   1200
   End
End
Attribute VB_Name = "DDC设置"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'***************************************************************************
http://www.codesky.net 源码天空
'***************************************************************************


Dim TxDDC() As Byte
Dim 本机地址 As Byte, 目的地址 As Byte
Dim Ti As Byte, i As Byte
 Dim 指令 As 指令       ' 定义变量类型为一个记录
Dim Ci As Integer, Adr_File As Integer


Private Sub Command10_Click()
 目的地址 = 0
   Call 发送给DDC(5, &H47, Val(Text1), 0, 0, 0, 0, 0, 0)
  目的地址 = Val(Text1.Text)
End Sub

Private Sub Command11_Click()
Unload Me
End Sub

Private Sub Command8_Click()  ' 根据模块号读文件至缓冲区
 Open "d:\data\DDC.dat" For Random As #5 Len = Len(指令)
 Adr_File = 50 * (Val(Text1) - 1)
 MSFlexGrid1.Visible = False
'---------------------------------------------------------------------------
  For Ci = 1 To 50
    Get #5, Ci + Adr_File, 指令               ' 读入一个记录   Ci+ Adr_File -> 指令
     MSFlexGrid1.Row = Ci   ' 置当前行
      '------------------------------------------------------
    ' If (指令.模式 + 指令.输出口 + 指令.启动时 + 指令.启动分+ 指令.关闭时 + 指令.关闭分) <> "" Then
        MSFlexGrid1.Col = 1     ' 置当前列
        MSFlexGrid1.Text = Trim(指令.模式)
        MSFlexGrid1.Col = 2
        MSFlexGrid1.Text = Trim(指令.输出口)
        MSFlexGrid1.Col = 3
        MSFlexGrid1.Text = Trim(指令.启动时)
        MSFlexGrid1.Col = 4
        MSFlexGrid1.Text = Trim(指令.启动分)
        MSFlexGrid1.Col = 5
        MSFlexGrid1.Text = Trim(指令.关闭时)
        MSFlexGrid1.Col = 6
        MSFlexGrid1.Text = Trim(指令.关闭分)
   '  End If
Next
'--------------------------------------------------------------------
MSFlexGrid1.Visible = True
Close #5                           ' 关闭文件
End Sub
Private Sub Command9_Click()  '缓冲区>> 文件
   Open "d:\data\DDC.dat" For Random As #3 Len = Len(指令)
      Adr_File = 50 * (Val(Text1) - 1)
     '---------------------------------------------------------------------------
       For Ci = 1 To 50
         MSFlexGrid1.Row = Ci ' 当前行
         MSFlexGrid1.Col = 1     ' 置当前列
        指令.模式 = MSFlexGrid1.Text 'MOD
        MSFlexGrid1.Col = 2
        指令.输出口 = MSFlexGrid1.Text 'JQ_n
        MSFlexGrid1.Col = 3
        指令.启动时 = MSFlexGrid1.Text 'T1
        MSFlexGrid1.Col = 4

⌨️ 快捷键说明

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