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

📄 frmgainlist.frm

📁 使用研华DAQ实现研华数据采集卡的多种功能。包括数据输入输出等。内含多个源码
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmGainList 
   Caption         =   "Channel Gain Code Setting"
   ClientHeight    =   3045
   ClientLeft      =   60
   ClientTop       =   375
   ClientWidth     =   5385
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3045
   ScaleWidth      =   5385
   StartUpPosition =   2  'CenterScreen
   Begin MSComctlLib.ListView ListGainList 
      Height          =   1215
      Left            =   360
      TabIndex        =   3
      Top             =   600
      Width           =   2490
      _ExtentX        =   4392
      _ExtentY        =   2143
      View            =   3
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   2
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "Chan"
         Object.Width           =   1765
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "Input Range"
         Object.Width           =   2470
      EndProperty
   End
   Begin VB.ComboBox cmbInputRangeDiff 
      Height          =   315
      Left            =   3240
      Style           =   2  'Dropdown List
      TabIndex        =   1
      Top             =   600
      Width           =   1815
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "&OK"
      Height          =   405
      Left            =   1680
      TabIndex        =   0
      Top             =   2280
      Width           =   1890
   End
   Begin VB.Label Label2 
      Caption         =   "Gain List"
      Height          =   255
      Index           =   1
      Left            =   360
      TabIndex        =   4
      Top             =   285
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "Range Selection"
      Height          =   255
      Index           =   0
      Left            =   3240
      TabIndex        =   2
      Top             =   280
      Width           =   1215
   End
End
Attribute VB_Name = "frmGainList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmbInputRangeDiff_Click()
   Dim i As Integer
   Dim GainItem As ListItem
   
   If gListIndex = 0 Then
     Exit Sub
   End If
   
   i = cmbInputRangeDiff.ListIndex
   gGainCodeList(gChanIndex) = i
   
   Set GainItem = ListGainList.ListItems.Item(gListIndex)
   GainItem.SubItems(1) = gInputRangeList(i)
   
End Sub

Private Sub cmdOK_Click()
Dim i As Integer
    frmAITester.DAQAI1.InputRangeList = gGainCodeList
    gListIndex = 0
   Unload Me
End Sub

Private Sub Form_Load()
   Dim i, j, startch, bRet As Integer
   Dim SubItems As ListItem
     
   For j = 0 To gNumOfInputRange - 1
      cmbInputRangeDiff.AddItem gInputRangeList(j)
   Next j
   cmbInputRangeDiff.ListIndex = 0

   gNumofChannels = frmAITester.DAQAI1.NumberOfChannels
   startch = frmAITester.DAQAI1.StartChannel
      
   For i = startch To (startch + gNumofChannels - 1)
      Set SubItems = ListGainList.ListItems.Add(, , Str(i))
      SubItems.SubItems(1) = gInputRangeList(gGainCodeList(i))
   Next i
     
End Sub

Private Sub ListGainList_Click()
   Dim SubItems As ListItem

   Set ListItem = ListGainList.SelectedItem
  
   gChanIndex = ListItem.Text
   gListIndex = ListGainList.SelectedItem.Index
   cmbInputRangeDiff.Text = ListItem.SubItems(1)
    
End Sub

⌨️ 快捷键说明

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