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

📄 frmeditramaddrrr.frm

📁 AD9954源码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmEditRAMAddrRR 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Edit RAM Address Ramp Rate"
   ClientHeight    =   2415
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4335
   Icon            =   "frmEditRAMAddrRR.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2415
   ScaleWidth      =   4335
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.VScrollBar vscRampRateTime 
      Height          =   435
      Left            =   150
      Max             =   -1
      Min             =   1
      TabIndex        =   11
      Top             =   360
      Width           =   200
   End
   Begin VB.TextBox txtRampRateTime 
      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            =   360
      MaxLength       =   10
      MultiLine       =   -1  'True
      TabIndex        =   10
      Text            =   "frmEditRAMAddrRR.frx":000C
      Top             =   360
      Width           =   1935
   End
   Begin VB.Frame fraRampRate 
      Caption         =   "Ramp Rate 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 txtBin 
         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           =   1
         Left            =   240
         MaxLength       =   8
         MultiLine       =   -1  'True
         TabIndex        =   6
         Text            =   "frmEditRAMAddrRR.frx":0015
         Top             =   840
         Width           =   975
      End
      Begin VB.TextBox txtBin 
         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            =   "frmEditRAMAddrRR.frx":001E
         Top             =   840
         Width           =   975
      End
      Begin VB.TextBox txtHex 
         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            =   "frmEditRAMAddrRR.frx":0027
         Top             =   360
         Width           =   615
      End
      Begin VB.TextBox txtDec 
         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
         Left            =   240
         MaxLength       =   5
         MultiLine       =   -1  'True
         TabIndex        =   3
         Text            =   "frmEditRAMAddrRR.frx":002E
         Top             =   360
         Width           =   735
      End
      Begin VB.Label lblHex 
         BackStyle       =   0  'Transparent
         Caption         =   "Hex"
         Height          =   255
         Index           =   1
         Left            =   2280
         TabIndex        =   9
         Top             =   360
         Width           =   375
      End
      Begin VB.Label lblTWBin 
         BackStyle       =   0  'Transparent
         Caption         =   "Bin"
         Height          =   255
         Left            =   2280
         TabIndex        =   8
         Top             =   840
         Width           =   375
      End
      Begin VB.Label lblDec 
         Caption         =   "Dec"
         Height          =   255
         Left            =   1080
         TabIndex        =   7
         Top             =   360
         Width           =   375
      End
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "Cancel"
      Height          =   375
      Left            =   3000
      TabIndex        =   1
      Top             =   600
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "OK"
      Height          =   375
      Left            =   3000
      TabIndex        =   0
      Top             =   120
      Width           =   1215
   End
   Begin VB.Label lblSec 
      BackStyle       =   0  'Transparent
      Caption         =   "s"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      Left            =   2550
      TabIndex        =   16
      Top             =   390
      Width           =   255
   End
   Begin VB.Shape shpOKHilight 
      BorderWidth     =   3
      Height          =   375
      Left            =   3000
      Top             =   120
      Width           =   1215
   End
   Begin VB.Label lblMhz 
      BackStyle       =   0  'Transparent
      Caption         =   "m"
      BeginProperty Font 
         Name            =   "Symbol"
         Size            =   12
         Charset         =   2
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   2400
      TabIndex        =   15
      Top             =   390
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "Ramp Rate"
      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            =   360
      TabIndex        =   14
      Top             =   120
      Width           =   975
   End
   Begin VB.Label lbDelta 
      Caption         =   "D"
      BeginProperty Font 
         Name            =   "Symbol"
         Size            =   8.25
         Charset         =   2
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1380
      TabIndex        =   13
      Top             =   120
      Width           =   135
   End
   Begin VB.Label lblDTime 
      Caption         =   "t:"
      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            =   1560
      TabIndex        =   12
      Top             =   120
      Width           =   195
   End
End
Attribute VB_Name = "frmEditRAMAddrRR"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private CancelHit As Boolean
Private OldValue As String
Private EditTbox As TextBox
Private OKHit As Boolean
Private MaxRAMRRT As Double
Private MinRAMRRT As Double
    
Public Sub ShowEditDialog(ByRef Tbox As TextBox, ByVal Title As String, ByVal SysClk As Variant)
'    Dim OldOutputVal As String
'    Dim TWDecVal As Variant
    Dim OldLeft As Single
    Dim OldTop As Single
    Dim DecVal As Variant
    
    'Set the sysclk value for internal functions
    EditDialogSysClk9859 = SysClk
    
    'Set the title of the dialog
    Me.Caption = Title
    
    'Store the value to be edited
    Set EditTbox = Tbox
    
    'Setup the textbox to the initial value
    txtRampRateTime.Text = Tbox.Text
    
    'Show the window off the screen so that it isn't seen yet
    Call SetWindowPos(Me.hWnd, HWND_NOTOPMOST, -500, -500, 0, 0, SWP_NOSIZE + SWP_SHOWWINDOW + SWP_NOACTIVATE)
    
    'Calculate the decimal tuning word
    DecVal = Tbox.Tag 'DecFix(CalculateDecTuningWord(CDbl(Tbox.Tag), CDbl(frmMain.txtExtClockFreq), TWBits))
    'OutputFreqVal =
    
    txtDec.Text = Format(DecVal, "00000")
    txtDec.SetFocus
'    TWDecVal = TWVal
    'Update the other textboxes
    UpdateVals (DecVal)
    
    'Set the focus to the output text box
    txtRampRateTime.SetFocus
    Me.Visible = False
    'Show the dialog
'    Me.Visible = True
    
    'Set the focus to the OutputVal textbox
'    txtOutputFreqVal.SetFocus
    
'    Me.Visible = False
    
    'Move the form back
    Me.Top = OldTop
    Me.Left = OldLeft
    
    'Show as modal
    Me.Show 1
    
    If OKHit = True Then
        'Ok was hit
        Tbox.Tag = txtDec.Text 'OutputFreqVal
        Tbox.Text = txtRampRateTime.Text
        'Record the new TunningWord value
        'TunningWord = TWDecVal
        'TWVal = CDec(txtTWDec.Text)
    End If
    
    'Unload the dialog
    Unload Me

      'Set the text of the box to the new value
'    txtOutputFreqVal.Text = Tbox
 
End Sub

Private Sub CancelButton_Click()
    'Cancel was hit
    OKHit = False
    'Hide the form
    Me.Hide
End Sub

Private Sub Form_Load()
    'Calculate the max and min values
    MaxRAMRRT = CalculateRAMRRTime(65535)
    MinRAMRRT = CalculateRAMRRTime(0)

End Sub

Private Sub Form_Unload(Cancel As Integer)

⌨️ 快捷键说明

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