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

📄 frmsetspeed.frm

📁 电动平台, 控制X,Y,Z轴移动,能计数
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmSetSpeed 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Dialog Caption"
   ClientHeight    =   2520
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   2655
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2520
   ScaleWidth      =   2655
   ShowInTaskbar   =   0   'False
   Visible         =   0   'False
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   120
      TabIndex        =   7
      Text            =   "Text3"
      Top             =   1200
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   120
      TabIndex        =   6
      Text            =   "Text2"
      Top             =   720
      Width           =   1335
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   120
      TabIndex        =   5
      Text            =   "Text1"
      Top             =   240
      Width           =   1335
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "Cancel"
      Height          =   375
      Left            =   1320
      TabIndex        =   0
      Top             =   1920
      Width           =   1095
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "OK"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   1920
      Width           =   1095
   End
   Begin VB.Label LabelCurve 
      Caption         =   "Curve"
      Height          =   255
      Left            =   1560
      TabIndex        =   4
      Top             =   1320
      Width           =   1215
   End
   Begin VB.Label LabelAcc 
      Caption         =   "Acc"
      Height          =   255
      Left            =   1560
      TabIndex        =   3
      Top             =   840
      Width           =   1215
   End
   Begin VB.Label LabelVel 
      Caption         =   "Speed"
      Height          =   255
      Left            =   1560
      TabIndex        =   2
      Top             =   360
      Width           =   1215
   End
End
Attribute VB_Name = "FrmSetSpeed"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public TheName As String



Private Sub CancelButton_Click()
    Unload Me
End Sub
Private Sub loadSettings()
    If TheName = "Focus" Then
       
        Text1.Text = Round(TestControl.myFocus.MaxSpeed)
        Text2.Text = Round(TestControl.myFocus.MaxAcceleration)
        Text3.Text = Round(TestControl.myFocus.Curve)
       
    ElseIf TheName = "Stage" Then
        Text1.Text = Round(TestControl.myStage.MaxSpeed)
        Text2.Text = Round(TestControl.myStage.MaxAcceleration)
        Text3.Text = Round(TestControl.myStage.Curve)
        
    Else
        Text1.Text = Round(TestControl.myFilter.MaxSpeed(TestControl.WhichFilter))
        Text2.Text = Round(TestControl.myFilter.MaxAcceleration(TestControl.WhichFilter))
        Text3.Text = Round(TestControl.myFilter.Curve(TestControl.WhichFilter))
    End If

End Sub

Private Sub Form_Load()
   
    FrmSetSpeed.Caption = TheName
    
    loadSettings
    
End Sub
Private Sub Apply()
   If TheName = "Focus" Then
        TestControl.myFocus.MaxSpeed = Text1.Text
        TestControl.myFocus.MaxAcceleration = Text2.Text
        TestControl.myFocus.Curve = Text3.Text
    ElseIf TheName = "Stage" Then
        TestControl.myStage.MaxSpeed = Text1.Text
        TestControl.myStage.MaxAcceleration = Text2.Text
        TestControl.myStage.Curve = Text3.Text
    Else
        TestControl.myFilter.MaxSpeed(TestControl.WhichFilter) = Text1.Text
        TestControl.myFilter.MaxAcceleration(TestControl.WhichFilter) = Text2.Text
       
        TestControl.myFilter.Curve(TestControl.WhichFilter) = Text3.Text
    End If
End Sub
Private Sub OKButton_Click()
    Apply
    Unload Me
End Sub


⌨️ 快捷键说明

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