home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / PcmRiffADS69570462002.psc / frmHertz.frm (.txt) next >
Encoding:
Visual Basic Form  |  2002-04-06  |  3.7 KB  |  130 lines

  1. VERSION 5.00
  2. Begin VB.Form frmHertz 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Frequency"
  5.    ClientHeight    =   1464
  6.    ClientLeft      =   3456
  7.    ClientTop       =   3288
  8.    ClientWidth     =   3432
  9.    ClipControls    =   0   'False
  10.    ControlBox      =   0   'False
  11.    BeginProperty Font 
  12.       Name            =   "Courier New"
  13.       Size            =   9.6
  14.       Charset         =   0
  15.       Weight          =   400
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    LinkTopic       =   "Form1"
  21.    MaxButton       =   0   'False
  22.    MinButton       =   0   'False
  23.    ScaleHeight     =   1464
  24.    ScaleWidth      =   3432
  25.    Begin VB.CommandButton Command3 
  26.       Caption         =   ">>"
  27.       Height          =   375
  28.       Index           =   1
  29.       Left            =   2700
  30.       TabIndex        =   4
  31.       Top             =   300
  32.       Width           =   495
  33.    End
  34.    Begin VB.CommandButton Command3 
  35.       Caption         =   "<<"
  36.       Height          =   375
  37.       Index           =   0
  38.       Left            =   240
  39.       TabIndex        =   3
  40.       Top             =   300
  41.       Width           =   495
  42.    End
  43.    Begin VB.CommandButton Command2 
  44.       Caption         =   "OK"
  45.       Height          =   375
  46.       Left            =   1980
  47.       TabIndex        =   2
  48.       Top             =   960
  49.       Width           =   1275
  50.    End
  51.    Begin VB.CommandButton Command1 
  52.       Caption         =   "Not"
  53.       Height          =   375
  54.       Left            =   180
  55.       TabIndex        =   1
  56.       Top             =   960
  57.       Width           =   1275
  58.    End
  59.    Begin VB.TextBox Text1 
  60.       Alignment       =   2  'Center
  61.       BeginProperty Font 
  62.          Name            =   "Courier New"
  63.          Size            =   12
  64.          Charset         =   0
  65.          Weight          =   400
  66.          Underline       =   0   'False
  67.          Italic          =   0   'False
  68.          Strikethrough   =   0   'False
  69.       EndProperty
  70.       Height          =   375
  71.       Left            =   1080
  72.       MaxLength       =   5
  73.       TabIndex        =   0
  74.       Text            =   "00000"
  75.       Top             =   300
  76.       Width           =   1215
  77.    End
  78. Attribute VB_Name = "frmHertz"
  79. Attribute VB_GlobalNameSpace = False
  80. Attribute VB_Creatable = False
  81. Attribute VB_PredeclaredId = True
  82. Attribute VB_Exposed = False
  83. ' Code module and project created by "Urthman"
  84. '   http://www.jsent.biz/urthman/
  85. '   http://www.mp3.com/urthman/
  86. Option Explicit
  87. Dim FreqID%
  88. Public Sub PrepMe(Which%)
  89.     FreqID = Which
  90.     Text1.Text = frmPcm.lblFreq(Which).Caption
  91. End Sub
  92. Private Sub Command1_Click()
  93.     frmPcm.Enabled = True
  94.     frmPcm.SetFocus
  95.     Unload Me
  96. End Sub
  97. Private Sub Command2_Click()
  98.     frmPcm.lblFreq(FreqID).Caption = Text1.Text
  99.     frmPcm.Enabled = True
  100.     frmPcm.SetFocus
  101.     Unload Me
  102. End Sub
  103. Private Sub Command3_Click(Index As Integer)
  104.     If IsNumeric(Text1.Text) Then
  105.         Select Case Index
  106.         Case 0: Text1.Text = (Text1.Text - 1)
  107.         Case 1: Text1.Text = (Text1.Text + 1)
  108.         End Select
  109.     End If
  110. End Sub
  111. Private Sub Form_Load()
  112.     Top = (Screen.Height - Height) / 2
  113.     Left = (Screen.Width - Width) / 2
  114. End Sub
  115. Private Sub Text1_Change()
  116.     If IsNumeric(Text1.Text) Then
  117.         Command2.Enabled = (Val(Text1.Text) > 20) And (Val(Text1.Text) < 20000)
  118.     Else
  119.         Command2.Enabled = False
  120.     End If
  121. End Sub
  122. Private Sub Text1_GotFocus()
  123.     Text1.SelStart = 0
  124.     Text1.SelLength = Len(Text1.Text)
  125. End Sub
  126. Private Sub Text1_LostFocus()
  127.     Text1.SelStart = 0
  128.     Text1.SelLength = 0
  129. End Sub
  130.