selwf.frm

来自「16 relay output channels and 16 isolated」· FRM 代码 · 共 157 行

FRM
157
字号
VERSION 5.00
Begin VB.Form SelectWaveform 
   Caption         =   "Select waveform for analog output function"
   ClientHeight    =   2190
   ClientLeft      =   2925
   ClientTop       =   2145
   ClientWidth     =   4395
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   2190
   ScaleWidth      =   4395
   Begin VB.CommandButton Command2 
      Caption         =   "&OK"
      Height          =   375
      Left            =   3120
      TabIndex        =   12
      Top             =   1560
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&Cancel"
      Height          =   375
      Left            =   3120
      TabIndex        =   0
      Top             =   1080
      Width           =   1095
   End
   Begin VB.TextBox EditAccuracy 
      Height          =   285
      Left            =   1440
      TabIndex        =   8
      Text            =   "500"
      Top             =   1680
      Width           =   735
   End
   Begin VB.TextBox EditOffset 
      Height          =   285
      Left            =   1440
      TabIndex        =   7
      Text            =   "0.00"
      Top             =   1200
      Width           =   735
   End
   Begin VB.TextBox EditMagnitude 
      Height          =   285
      Left            =   1440
      TabIndex        =   5
      Text            =   "5.00"
      Top             =   720
      Width           =   735
   End
   Begin VB.ComboBox CmbSelectWaveform 
      Height          =   315
      ItemData        =   "SelWf.frx":0000
      Left            =   1440
      List            =   "SelWf.frx":000D
      TabIndex        =   2
      Text            =   "Sine"
      Top             =   240
      Width           =   1215
   End
   Begin VB.Label Label7 
      Caption         =   "Points"
      Height          =   255
      Left            =   2280
      TabIndex        =   11
      Top             =   1680
      Width           =   495
   End
   Begin VB.Label Label6 
      Caption         =   "V"
      Height          =   255
      Left            =   2280
      TabIndex        =   10
      Top             =   1200
      Width           =   255
   End
   Begin VB.Label Label5 
      Caption         =   "V"
      Height          =   255
      Left            =   2280
      TabIndex        =   9
      Top             =   720
      Width           =   255
   End
   Begin VB.Label Label4 
      Caption         =   "Accuracy"
      Height          =   255
      Left            =   360
      TabIndex        =   6
      Top             =   1680
      Width           =   855
   End
   Begin VB.Label Label3 
      Caption         =   "Offset:"
      Height          =   255
      Left            =   360
      TabIndex        =   4
      Top             =   1200
      Width           =   855
   End
   Begin VB.Label Label2 
      Caption         =   "Magnitude:"
      Height          =   255
      Left            =   360
      TabIndex        =   3
      Top             =   720
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "Waveform:"
      Height          =   255
      Left            =   360
      TabIndex        =   1
      Top             =   240
      Width           =   855
   End
End
Attribute VB_Name = "SelectWaveform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Private Sub Command1_Click()

  Unload SelectWaveform
  
End Sub


Private Sub Command2_Click()
   frmSelDev.labWaveform.Caption = CmbSelectWaveform.Text + ", " + EditAccuracy.Text + "pt"
   
   'record the waveform information}
    gwavOut.iType = CmbSelectWaveform.ListIndex          '{0: Sine, 1: Triangle, 2: Square}
    gwavOut.fMagnitude = Val(EditMagnitude.Text)
    gwavOut.fOffset = Val(EditOffset.Text)
    gwavOut.lPeriod = Val(EditAccuracy.Text)
    
    Unload SelectWaveform
End Sub


Private Sub Form_Load()
 'frmSelDev.labWaveform.Caption = CmbSelectWaveform.Text + ", " + editAccuracy.Text + "pt"
   '{record the waveform information}
    CmbSelectWaveform.ListIndex = gwavOut.iType         '{0: Sine, 1: Triangle, 2: Square}
    EditMagnitude.Text = Str(gwavOut.fMagnitude)
    EditOffset.Text = Str(gwavOut.fOffset)
    EditAccuracy.Text = Str(gwavOut.lPeriod)
End Sub


⌨️ 快捷键说明

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