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

📄 frmeditphaseoffset1.frm

📁 AD9954源码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmEditPhaseOffset1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Edit Phase Offset"
   ClientHeight    =   2415
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4335
   Icon            =   "frmEditPhaseOffset1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2415
   ScaleWidth      =   4335
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.VScrollBar vscPhaseOffset 
      Height          =   435
      Left            =   240
      Max             =   -1
      Min             =   1
      TabIndex        =   12
      Top             =   360
      Width           =   200
   End
   Begin VB.TextBox txtSearchPhaseOff 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   480
      MaxLength       =   7
      MultiLine       =   -1  'True
      TabIndex        =   11
      Text            =   "frmEditPhaseOffset1.frx":000C
      ToolTipText     =   "Sets the Desired Phase Offset value"
      Top             =   360
      Width           =   1410
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "Cancel"
      Height          =   375
      Left            =   3000
      TabIndex        =   1
      Top             =   600
      Width           =   1215
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "&OK"
      Height          =   375
      Left            =   3000
      TabIndex        =   0
      Top             =   120
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Caption         =   "Register Values"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1335
      Left            =   120
      TabIndex        =   3
      Top             =   960
      Width           =   2775
      Begin VB.TextBox txtBinVal 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Index           =   0
         Left            =   1200
         MaxLength       =   8
         MultiLine       =   -1  'True
         TabIndex        =   6
         Text            =   "frmEditPhaseOffset1.frx":0012
         ToolTipText     =   "Sets the phase offset binary register value"
         Top             =   840
         Width           =   975
      End
      Begin VB.TextBox txtHexVal 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1560
         MaxLength       =   4
         MultiLine       =   -1  'True
         TabIndex        =   5
         Text            =   "frmEditPhaseOffset1.frx":001D
         ToolTipText     =   "Sets the phase offset hexadecimal register value"
         Top             =   360
         Width           =   615
      End
      Begin VB.TextBox txtDecVal 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         MaxLength       =   5
         MultiLine       =   -1  'True
         TabIndex        =   4
         Text            =   "frmEditPhaseOffset1.frx":0022
         ToolTipText     =   "Sets the phase offset decimal register value"
         Top             =   360
         Width           =   735
      End
      Begin VB.TextBox txtBinVal 
         Alignment       =   1  'Right Justify
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Index           =   1
         Left            =   240
         MaxLength       =   6
         MultiLine       =   -1  'True
         TabIndex        =   13
         Text            =   "frmEditPhaseOffset1.frx":0028
         ToolTipText     =   "Sets the phase offset binary register value"
         Top             =   840
         Width           =   975
      End
      Begin VB.Label lblBin 
         Caption         =   "Bin"
         Height          =   255
         Left            =   2280
         TabIndex        =   9
         Top             =   840
         Width           =   375
      End
      Begin VB.Label lblHex 
         Caption         =   "Hex"
         Height          =   255
         Left            =   2280
         TabIndex        =   8
         Top             =   360
         Width           =   375
      End
      Begin VB.Label lblDec 
         Caption         =   "Dec"
         Height          =   255
         Left            =   1080
         TabIndex        =   7
         Top             =   360
         Width           =   375
      End
   End
   Begin VB.Label lblActualPhaseDelay 
      Caption         =   "Phase Offset:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   480
      TabIndex        =   10
      Top             =   120
      Width           =   1335
   End
   Begin VB.Label lblPhaseDelDeg 
      Caption         =   "Deg"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1920
      TabIndex        =   2
      Top             =   405
      Width           =   495
   End
End
Attribute VB_Name = "frmEditPhaseOffset1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim PhaseOffArray() As Double
Dim EditBox As TextBox
Dim NumPhaseVals As Integer

'Flag that signals to the lstPhaseOffBox_click event that the text box is
'just updating the list index to match its contents
Dim ListUpdateFlag As Boolean 'Flag the lets the

'Returns the decimal seperator in either ascii code or
'the character
Private Function GetDecSeparator(ByVal RetAsciiCode As Boolean) As Variant
    If RetAsciiCode Then
        GetDecSeparator = Asc(Mid(Format(0, "Fixed"), 2, 1))
    Else
        GetDecSeparator = Mid(Format(0, "Fixed"), 2, 1)
    End If
End Function
Private Sub UpdatePO(ByVal value As Variant)
    Dim POBin As String
    Dim OutFreqval As Variant
        
    'Output frequency textbox
    If Not (ActiveControl Is txtSearchPhaseOff) Then
        'Update this box because it is not currently active
        txtSearchPhaseOff.Text = Format(CalcPO(value), "0.000")
        txtSearchPhaseOff.Tag = value
    End If
    
    'Decimal value textbox
    If Not (ActiveControl Is txtDecVal) Then
        txtDecVal.Text = Format(value, "00000")
        txtDecVal.Text = String(5 - Len(txtDecVal.Text), "0") & txtDecVal.Text
        txtDecVal.Refresh
    End If
    
    'Hex textbox
    If Not (ActiveControl Is txtHexVal) Then
        'Update this box because it is not currently active
        txtHexVal.Text = cbaseHex(value, 4)
        txtHexVal.Text = String(4 - Len(txtHexVal.Text), "0") & txtHexVal.Text
        txtHexVal.Refresh
    End If
    
    'Generate a binary string representing the phase offset value
    POBin = cbaseDec2Bin(value, NumPhaseBits)
    
    'Binary TextBoxes
    If Not (ActiveControl Is txtBinVal) Then
        txtBinVal(0).Text = Right(POBin, 8)
        txtBinVal(1).Text = Left(POBin, 6)
        txtBinVal(0).Refresh
        txtBinVal(1).Refresh
    End If
    
End Sub




⌨️ 快捷键说明

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