home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch15 / numstr / testform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-06-22  |  5.0 KB  |  162 lines

  1. VERSION 5.00
  2. Begin VB.Form TestForm 
  3.    Caption         =   "String Operations Test Form"
  4.    ClientHeight    =   3990
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5430
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3990
  10.    ScaleWidth      =   5430
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton Command3 
  13.       Caption         =   "Convert to Binary"
  14.       BeginProperty Font 
  15.          Name            =   "Verdana"
  16.          Size            =   9
  17.          Charset         =   0
  18.          Weight          =   400
  19.          Underline       =   0   'False
  20.          Italic          =   0   'False
  21.          Strikethrough   =   0   'False
  22.       EndProperty
  23.       Height          =   450
  24.       Left            =   120
  25.       TabIndex        =   7
  26.       Top             =   3000
  27.       Width           =   1815
  28.    End
  29.    Begin VB.TextBox Text4 
  30.       BeginProperty Font 
  31.          Name            =   "Verdana"
  32.          Size            =   9
  33.          Charset         =   0
  34.          Weight          =   400
  35.          Underline       =   0   'False
  36.          Italic          =   0   'False
  37.          Strikethrough   =   0   'False
  38.       EndProperty
  39.       Height          =   330
  40.       Left            =   120
  41.       TabIndex        =   6
  42.       Top             =   3555
  43.       Width           =   5145
  44.    End
  45.    Begin VB.TextBox Text1 
  46.       BeginProperty Font 
  47.          Name            =   "Verdana"
  48.          Size            =   9
  49.          Charset         =   0
  50.          Weight          =   400
  51.          Underline       =   0   'False
  52.          Italic          =   0   'False
  53.          Strikethrough   =   0   'False
  54.       EndProperty
  55.       Height          =   345
  56.       Left            =   2880
  57.       TabIndex        =   4
  58.       Text            =   "9003"
  59.       Top             =   75
  60.       Width           =   1410
  61.    End
  62.    Begin VB.TextBox Text3 
  63.       BeginProperty Font 
  64.          Name            =   "Verdana"
  65.          Size            =   9
  66.          Charset         =   0
  67.          Weight          =   400
  68.          Underline       =   0   'False
  69.          Italic          =   0   'False
  70.          Strikethrough   =   0   'False
  71.       EndProperty
  72.       Height          =   330
  73.       Left            =   150
  74.       TabIndex        =   3
  75.       Top             =   2460
  76.       Width           =   5145
  77.    End
  78.    Begin VB.CommandButton Command2 
  79.       Caption         =   "Convert to LCaps"
  80.       BeginProperty Font 
  81.          Name            =   "Verdana"
  82.          Size            =   9
  83.          Charset         =   0
  84.          Weight          =   400
  85.          Underline       =   0   'False
  86.          Italic          =   0   'False
  87.          Strikethrough   =   0   'False
  88.       EndProperty
  89.       Height          =   450
  90.       Left            =   150
  91.       TabIndex        =   2
  92.       Top             =   1905
  93.       Width           =   1815
  94.    End
  95.    Begin VB.TextBox Text2 
  96.       BeginProperty Font 
  97.          Name            =   "Verdana"
  98.          Size            =   9
  99.          Charset         =   0
  100.          Weight          =   400
  101.          Underline       =   0   'False
  102.          Italic          =   0   'False
  103.          Strikethrough   =   0   'False
  104.       EndProperty
  105.       Height          =   330
  106.       Left            =   150
  107.       TabIndex        =   1
  108.       Top             =   1320
  109.       Width           =   5145
  110.    End
  111.    Begin VB.CommandButton Command1 
  112.       Caption         =   "Convert to String"
  113.       BeginProperty Font 
  114.          Name            =   "Verdana"
  115.          Size            =   9
  116.          Charset         =   0
  117.          Weight          =   400
  118.          Underline       =   0   'False
  119.          Italic          =   0   'False
  120.          Strikethrough   =   0   'False
  121.       EndProperty
  122.       Height          =   450
  123.       Left            =   150
  124.       TabIndex        =   0
  125.       Top             =   795
  126.       Width           =   1815
  127.    End
  128.    Begin VB.Label Label1 
  129.       Caption         =   "Enter a value (0-9999)"
  130.       BeginProperty Font 
  131.          Name            =   "Verdana"
  132.          Size            =   9
  133.          Charset         =   0
  134.          Weight          =   400
  135.          Underline       =   0   'False
  136.          Italic          =   0   'False
  137.          Strikethrough   =   0   'False
  138.       EndProperty
  139.       Height          =   255
  140.       Left            =   120
  141.       TabIndex        =   5
  142.       Top             =   120
  143.       Width           =   2415
  144.    End
  145. Attribute VB_Name = "TestForm"
  146. Attribute VB_GlobalNameSpace = False
  147. Attribute VB_Creatable = False
  148. Attribute VB_PredeclaredId = True
  149. Attribute VB_Exposed = False
  150. Dim NS As New NumStrings.StringClass
  151. Private Sub Command1_Click()
  152.     Text2.Text = NS.Number2String(Text1.Text)
  153. End Sub
  154. Private Sub Command2_Click()
  155. Dim NStr As String
  156.     NStr = NS.Number2String(Text1.Text)
  157.     Text3.Text = NS.LowerCaps(NStr)
  158. End Sub
  159. Private Sub Command3_Click()
  160.     Text4.Text = NS.Integer2Binary(Text1.Text)
  161. End Sub
  162.