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

📄 frmeditosf.frm

📁 AD9954源码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmEditOSF 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Edit Output Scale Factor"
   ClientHeight    =   2415
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4335
   Icon            =   "frmEditOSF.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2415
   ScaleWidth      =   4335
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.VScrollBar vscValue 
      Height          =   435
      Left            =   240
      Max             =   -1
      Min             =   1
      TabIndex        =   11
      Top             =   360
      Width           =   200
   End
   Begin VB.TextBox txtValue 
      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        =   10
      Tag             =   "0"
      Text            =   "frmEditOSF.frx":000C
      ToolTipText     =   "Sets the Output Scale Factor value"
      Top             =   360
      Width           =   1890
   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        =   2
      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        =   5
         Text            =   "frmEditOSF.frx":0016
         ToolTipText     =   "Sets the output scale factor 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        =   4
         Text            =   "frmEditOSF.frx":0021
         ToolTipText     =   "Sets the output scale factor 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        =   3
         Text            =   "frmEditOSF.frx":0026
         ToolTipText     =   "Sets the output scale factor 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        =   12
         Text            =   "frmEditOSF.frx":002C
         ToolTipText     =   "Sets the output scale factor binary register value"
         Top             =   840
         Width           =   975
      End
      Begin VB.Label lblBin 
         Caption         =   "Bin"
         Height          =   255
         Left            =   2280
         TabIndex        =   8
         Top             =   840
         Width           =   375
      End
      Begin VB.Label lblHex 
         Caption         =   "Hex"
         Height          =   255
         Left            =   2280
         TabIndex        =   7
         Top             =   360
         Width           =   375
      End
      Begin VB.Label lblDec 
         Caption         =   "Dec"
         Height          =   255
         Left            =   1080
         TabIndex        =   6
         Top             =   360
         Width           =   375
      End
   End
   Begin VB.Label lblActualPhaseDelay 
      Caption         =   "Output Scale Factor:"
      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        =   9
      Top             =   120
      Width           =   1815
   End
End
Attribute VB_Name = "frmEditOSF"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim EditBox As TextBox
Dim NumOSFVals 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 UpdateVals(ByVal value As Variant)
    Dim OSFBin As String
    Dim OutFreqval As Variant
        
    'Output frequency textbox
    If Not (ActiveControl Is txtValue) Then
        'Update this box because it is not currently active
        txtValue.Text = Format(CalculateOSF(value), "0.00000")
        txtValue.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
    OSFBin = cbaseDec2Bin(value, NumOSFBits)
    
    'Binary TextBoxes
    If Not (ActiveControl Is txtBinVal) Then
        txtBinVal(0).Text = Right(OSFBin, 8)
        txtBinVal(1).Text = Left(OSFBin, 6)
        txtBinVal(0).Refresh
        txtBinVal(1).Refresh
    End If
    
End Sub

⌨️ 快捷键说明

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