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

📄 frmcanshu.frm

📁 用于控制氧乐果生产的程序
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmCanShu 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "参数设置窗口"
   ClientHeight    =   5175
   ClientLeft      =   30
   ClientTop       =   330
   ClientWidth     =   7440
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   5175
   ScaleWidth      =   7440
   Begin VB.CommandButton Command1 
      BackColor       =   &H80000000&
      Cancel          =   -1  'True
      Caption         =   "退出&B"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   540
      Left            =   6120
      MouseIcon       =   "frmCanShu.frx":0000
      MousePointer    =   99  'Custom
      Picture         =   "frmCanShu.frx":0152
      Style           =   1  'Graphical
      TabIndex        =   4
      ToolTipText     =   "退出本窗口"
      Top             =   4356
      Width           =   612
   End
   Begin VB.CommandButton cmdUpdate1 
      Caption         =   "更新&U"
      Height          =   330
      Left            =   1680
      MouseIcon       =   "frmCanShu.frx":0314
      MousePointer    =   99  'Custom
      TabIndex        =   3
      ToolTipText     =   "按下按钮,输入正确的密码后,可以更改参数"
      Top             =   4440
      Width           =   700
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定&O"
      Height          =   330
      Left            =   4200
      MouseIcon       =   "frmCanShu.frx":0466
      MousePointer    =   99  'Custom
      TabIndex        =   2
      ToolTipText     =   "按下按钮,更改后的参数将被保存,并被系统采用"
      Top             =   4440
      Width           =   700
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "D:\ylg2\csdata\csdb.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   324
      Left            =   0
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "neibuchucs"
      Top             =   4560
      Visible         =   0   'False
      Width           =   1632
   End
   Begin TabDlg.SSTab SSTab1 
      Height          =   4164
      Left            =   40
      TabIndex        =   0
      Top             =   36
      Width           =   7252
      _ExtentX        =   12779
      _ExtentY        =   7355
      _Version        =   393216
      Tabs            =   4
      Tab             =   3
      TabsPerRow      =   5
      TabHeight       =   420
      TabCaption(0)   =   "工艺参数&1"
      TabPicture(0)   =   "frmCanShu.frx":05B8
      Tab(0).ControlEnabled=   0   'False
      Tab(0).Control(0)=   "dbg1(0)"
      Tab(0).ControlCount=   1
      TabCaption(1)   =   "其它参数&2"
      TabPicture(1)   =   "frmCanShu.frx":05D4
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "dbg1(1)"
      Tab(1).Control(0).Enabled=   0   'False
      Tab(1).Control(1)=   "Label2"
      Tab(1).Control(1).Enabled=   0   'False
      Tab(1).Control(2)=   "Label1"
      Tab(1).Control(2).Enabled=   0   'False
      Tab(1).ControlCount=   3
      TabCaption(2)   =   "内部输入参数&3"
      TabPicture(2)   =   "frmCanShu.frx":05F0
      Tab(2).ControlEnabled=   0   'False
      Tab(2).Control(0)=   "dbg1(2)"
      Tab(2).Control(0).Enabled=   0   'False
      Tab(2).ControlCount=   1
      TabCaption(3)   =   "内部输出参数&4"
      TabPicture(3)   =   "frmCanShu.frx":060C
      Tab(3).ControlEnabled=   -1  'True
      Tab(3).Control(0)=   "dbg1(3)"
      Tab(3).Control(0).Enabled=   0   'False
      Tab(3).ControlCount=   1
      Begin MSDBGrid.DBGrid dbg1 
         Bindings        =   "frmCanShu.frx":0628
         Height          =   1932
         Index           =   0
         Left            =   -74880
         OleObjectBlob   =   "frmCanShu.frx":063C
         TabIndex        =   1
         Top             =   360
         Width           =   6972
      End
      Begin MSDBGrid.DBGrid dbg1 
         Bindings        =   "frmCanShu.frx":1843
         Height          =   3732
         Index           =   1
         Left            =   -74880
         OleObjectBlob   =   "frmCanShu.frx":1857
         TabIndex        =   5
         Top             =   360
         Width           =   4452
      End
      Begin MSDBGrid.DBGrid dbg1 
         Bindings        =   "frmCanShu.frx":222E
         Height          =   3732
         Index           =   2
         Left            =   -74940
         OleObjectBlob   =   "frmCanShu.frx":2242
         TabIndex        =   6
         Top             =   360
         Width           =   7140
      End
      Begin MSDBGrid.DBGrid dbg1 
         Bindings        =   "frmCanShu.frx":4039
         Height          =   3252
         Index           =   3
         Left            =   120
         OleObjectBlob   =   "frmCanShu.frx":404D
         TabIndex        =   7
         Top             =   360
         Width           =   6972
      End
      Begin VB.Label Label2 
         Caption         =   "A/D修正算法:Y=AYsample-B"
         Height          =   372
         Left            =   -70200
         TabIndex        =   9
         Top             =   2040
         Width           =   1212
      End
      Begin VB.Label Label1 
         Caption         =   "滤波算法:Y(n+1)=(1-K)X(n)+KY(n)"
         Height          =   372
         Left            =   -70200
         TabIndex        =   8
         Top             =   1440
         Width           =   2172
      End
   End
End
Attribute VB_Name = "frmCanShu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private mblnUpdatable As Boolean
Private mintfyfIndex, i As Integer
Private Sub cmdOK_Click()
On Error Resume Next
If Me.Updatable Then
    Data1.Refresh
End If
For i = 0 To 3
    Me.dbg1(i).Refresh
    Me.dbg1(i).AllowUpdate = False
Next
Me.Updatable = False
cmdOK.Enabled = False
Call mainfrm.ReadParameter
End Sub

Private Sub cmdUpdate1_Click()
On Error Resume Next
Call Inform(22)
With frmPassword
    .EventChar = "update canshu"
    .Show vbModal
End With
End Sub

Private Sub Command1_Click()
Data1.Recordset.Close
Unload Me
End Sub
Private Sub Form_Load()
Width = Screen.Width - dataviewfrm.Width - dataviewfrm.Left
Left = dataviewfrm.Left + dataviewfrm.Width
Top = baojingfrm.Top + baojingfrm.Height
Height = Screen.Height - baojingfrm.Top - baojingfrm.Height
cmdOK.Enabled = False
With Me
    .fyfIndex = SSTab1.Tab + 1
    .Updatable = False
    For i = 0 To 3
        .dbg1(i).AllowUpdate = False
    Next
End With
With Data1
    Select Case Me.fyfIndex
        Case 1
            .RecordSource = "gongyics"
        Case 2
            .RecordSource = "kongzhics"
        Case 3
            .RecordSource = "neibucs"
        Case 4
            .RecordSource = "neibuchucs"
    End Select
    .Refresh
End With
End Sub

Public Property Get Updatable() As Boolean
    Updatable = mblnUpdatable
End Property
Public Property Let Updatable(vData As Boolean)
    mblnUpdatable = vData
    If vData Then
    End If
End Property
Public Property Let fyfIndex(vData As Integer)
    mintfyfIndex = vData
End Property
Public Property Get fyfIndex() As Integer
    fyfIndex = mintfyfIndex
End Property
Private Sub SSTab1_Click(PreviousTab As Integer)
'******************************************************
'属性fyfIndex与SSTab1的Tab属性对应,从而dbg(i)与相应表对应
'******************************************************
Me.fyfIndex = SSTab1.Tab + 1
With Data1
    Select Case Me.fyfIndex
        Case 1
            .RecordSource = "gongyics"
        Case 2
            .RecordSource = "kongzhics"
        Case 3
            .RecordSource = "neibucs"
        Case 4
            .RecordSource = "neibuchucs"
    End Select
    .Refresh
End With
End Sub


⌨️ 快捷键说明

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