home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_2 / STR_PLUS / NBRSTR.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-07-19  |  4.1 KB  |  143 lines

  1. VERSION 2.00
  2. Begin Form NbrStr 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Number Strings"
  6.    ClientHeight    =   3840
  7.    ClientLeft      =   1095
  8.    ClientTop       =   1485
  9.    ClientWidth     =   7485
  10.    ControlBox      =   0   'False
  11.    Height          =   4245
  12.    Left            =   1035
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3840
  17.    ScaleWidth      =   7485
  18.    Top             =   1140
  19.    Width           =   7605
  20.    Begin TextBox Text1 
  21.       Height          =   285
  22.       Left            =   240
  23.       MaxLength       =   9
  24.       TabIndex        =   0
  25.       Text            =   "Text1"
  26.       Top             =   1080
  27.       Width           =   6975
  28.    End
  29.    Begin CommandButton CmdOkay 
  30.       BackColor       =   &H00C0C0C0&
  31.       Cancel          =   -1  'True
  32.       Caption         =   "O &K A Y"
  33.       Height          =   375
  34.       Left            =   3840
  35.       TabIndex        =   4
  36.       Top             =   3240
  37.       Width           =   3375
  38.    End
  39.    Begin CommandButton CmdWordNumber 
  40.       BackColor       =   &H00C0C0C0&
  41.       Caption         =   "Get&WordNumber"
  42.       Height          =   375
  43.       Left            =   3840
  44.       TabIndex        =   3
  45.       Top             =   2760
  46.       Width           =   3375
  47.    End
  48.    Begin CommandButton CmdRomanNumber 
  49.       BackColor       =   &H00C0C0C0&
  50.       Caption         =   "Get&RomanNumber"
  51.       Height          =   375
  52.       Left            =   240
  53.       TabIndex        =   2
  54.       Top             =   3240
  55.       Width           =   3375
  56.    End
  57.    Begin CommandButton CmdOrdinalExt 
  58.       BackColor       =   &H00C0C0C0&
  59.       Caption         =   "Get&OrdinalExt"
  60.       Height          =   375
  61.       Left            =   240
  62.       TabIndex        =   1
  63.       Top             =   2760
  64.       Width           =   3375
  65.    End
  66.    Begin Label Label3 
  67.       Alignment       =   2  'Center
  68.       BackStyle       =   0  'Transparent
  69.       Caption         =   "Label3"
  70.       ForeColor       =   &H00008000&
  71.       Height          =   255
  72.       Left            =   1560
  73.       TabIndex        =   6
  74.       Top             =   1800
  75.       Width           =   4695
  76.    End
  77.    Begin Label Label2 
  78.       BorderStyle     =   1  'Fixed Single
  79.       Caption         =   "Label2"
  80.       Height          =   255
  81.       Left            =   240
  82.       TabIndex        =   7
  83.       Top             =   2160
  84.       Width           =   6975
  85.    End
  86.    Begin Label Label1 
  87.       Alignment       =   2  'Center
  88.       BackStyle       =   0  'Transparent
  89.       Caption         =   "Label1"
  90.       ForeColor       =   &H00000080&
  91.       Height          =   735
  92.       Left            =   1560
  93.       TabIndex        =   5
  94.       Top             =   240
  95.       Width           =   4695
  96.    End
  97. Sub CmdOkay_Click ()
  98.     Unload Me
  99. End Sub
  100. Sub CmdOrdinalExt_Click ()
  101.     lpAmount% = Abs(Val(Text1.Text))
  102.     ReturnString$ = Space$(255)
  103.     GetOrdinalExt lpAmount%, ReturnString$
  104.     Label2.Caption = ReturnString$
  105. End Sub
  106. Sub CmdRomanNumber_Click ()
  107.     lpAmount% = Abs(Val(Text1.Text))
  108.     ReturnString$ = Space$(255)
  109.     GetRomanNumber lpAmount%, ReturnString$
  110.     Label2.Caption = ReturnString$
  111. End Sub
  112. Sub CmdWordNumber_Click ()
  113.     Amount# = Abs(Val(Text1.Text))
  114.     lpAmount$ = Str$(Amount#)
  115.     ReturnString$ = Space$(255)
  116.     GetWordNumber lpAmount$, ReturnString$
  117.     Label2.Caption = ReturnString$
  118. End Sub
  119. Sub Form_Load ()
  120.     FormCenterScreen Me
  121.     nl$ = Chr$(13) + Chr$(10)
  122.     msg$ = "Enter a sample number and then select" + nl$
  123.     msg$ = msg$ + "a command button to view the effect."
  124.     label1.Caption = msg$
  125.     Label2.Caption = ""
  126.     msg$ = "The resultant effect:"
  127.     label3.Caption = msg$
  128.     Text1.Text = "1234"
  129.     Screen.MousePointer = 0
  130. End Sub
  131. Sub Form_Paint ()
  132.     DoForm3D Me, sunken, 1, 5
  133. End Sub
  134. Sub Text1_Change ()
  135.     If Label2.Caption <> "" Then
  136.         Label2.Caption = ""
  137.         End If
  138. End Sub
  139. Sub Text1_GotFocus ()
  140.     Text1.SelStart = 0
  141.     Text1.SelLength = Len(Text1.Text)
  142. End Sub
  143.