home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / editdemo / editdemo.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-09-06  |  7.9 KB  |  296 lines

  1. VERSION 2.00
  2. Begin Form DemoFrm1 
  3.    BackColor       =   &H00FFFFFF&
  4.    Caption         =   "VB Input Demo Form"
  5.    ClientHeight    =   4815
  6.    ClientLeft      =   1095
  7.    ClientTop       =   1485
  8.    ClientWidth     =   7185
  9.    Height          =   5220
  10.    Left            =   1035
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   4815
  14.    ScaleWidth      =   7185
  15.    Top             =   1140
  16.    Width           =   7305
  17.    Begin TextBox Text9 
  18.       BackColor       =   &H00E0FFFF&
  19.       Height          =   375
  20.       Left            =   1440
  21.       TabIndex        =   17
  22.       Top             =   3960
  23.       Width           =   2175
  24.    End
  25.    Begin TextBox Text8 
  26.       BackColor       =   &H00E0FFFF&
  27.       Height          =   375
  28.       Left            =   1440
  29.       TabIndex        =   16
  30.       Top             =   3480
  31.       Width           =   2175
  32.    End
  33.    Begin TextBox Text7 
  34.       BackColor       =   &H00E0FFFF&
  35.       Height          =   375
  36.       Left            =   1440
  37.       TabIndex        =   13
  38.       Top             =   3000
  39.       Width           =   2175
  40.    End
  41.    Begin TextBox Text6 
  42.       BackColor       =   &H00E0FFFF&
  43.       Height          =   375
  44.       Left            =   1440
  45.       TabIndex        =   11
  46.       Top             =   2520
  47.       Width           =   2175
  48.    End
  49.    Begin TextBox Text5 
  50.       BackColor       =   &H00E0FFFF&
  51.       Height          =   375
  52.       Left            =   1440
  53.       TabIndex        =   9
  54.       Top             =   2040
  55.       Width           =   2175
  56.    End
  57.    Begin TextBox Text4 
  58.       BackColor       =   &H00E0FFFF&
  59.       Height          =   375
  60.       Left            =   1440
  61.       TabIndex        =   7
  62.       Top             =   1560
  63.       Width           =   2175
  64.    End
  65.    Begin TextBox Text3 
  66.       BackColor       =   &H00E0FFFF&
  67.       Height          =   375
  68.       Left            =   1440
  69.       TabIndex        =   6
  70.       Top             =   1080
  71.       Width           =   2175
  72.    End
  73.    Begin TextBox Text11 
  74.       BackColor       =   &H00E0FFFF&
  75.       Height          =   375
  76.       Left            =   4920
  77.       TabIndex        =   21
  78.       Top             =   600
  79.       Width           =   2175
  80.    End
  81.    Begin TextBox Text2 
  82.       BackColor       =   &H00E0FFFF&
  83.       Height          =   375
  84.       Left            =   1440
  85.       TabIndex        =   1
  86.       Top             =   600
  87.       Width           =   2175
  88.    End
  89.    Begin TextBox Text10 
  90.       BackColor       =   &H00E0FFFF&
  91.       Height          =   375
  92.       Left            =   4920
  93.       TabIndex        =   19
  94.       Top             =   120
  95.       Width           =   2175
  96.    End
  97.    Begin TextBox Text1 
  98.       BackColor       =   &H00E0FFFF&
  99.       Height          =   375
  100.       Left            =   1440
  101.       TabIndex        =   0
  102.       Top             =   120
  103.       Width           =   2175
  104.    End
  105.    Begin Label Label9 
  106.       Caption         =   "Currency 4"
  107.       Height          =   375
  108.       Left            =   120
  109.       TabIndex        =   15
  110.       Top             =   4080
  111.       Width           =   1215
  112.    End
  113.    Begin Label Label8 
  114.       Caption         =   "Currency 2"
  115.       Height          =   255
  116.       Left            =   120
  117.       TabIndex        =   14
  118.       Top             =   3600
  119.       Width           =   1215
  120.    End
  121.    Begin Label Label7 
  122.       BackColor       =   &H00FFFFFF&
  123.       Caption         =   "Upper Case"
  124.       Height          =   255
  125.       Left            =   120
  126.       TabIndex        =   12
  127.       Top             =   3120
  128.       Width           =   1215
  129.    End
  130.    Begin Label Label6 
  131.       BackColor       =   &H00FFFFFF&
  132.       Caption         =   "Mult/Price"
  133.       Height          =   375
  134.       Left            =   120
  135.       TabIndex        =   10
  136.       Top             =   2640
  137.       Width           =   1215
  138.    End
  139.    Begin Label Label5 
  140.       BackColor       =   &H00FFFFFF&
  141.       Caption         =   "Date"
  142.       Height          =   375
  143.       Left            =   120
  144.       TabIndex        =   8
  145.       Top             =   2160
  146.       Width           =   1215
  147.    End
  148.    Begin Label Label4 
  149.       BackColor       =   &H00FFFFFF&
  150.       Caption         =   "Long Integer"
  151.       Height          =   375
  152.       Left            =   120
  153.       TabIndex        =   5
  154.       Top             =   1680
  155.       Width           =   1215
  156.    End
  157.    Begin Label Label3 
  158.       BackColor       =   &H00FFFFFF&
  159.       Caption         =   "String"
  160.       Height          =   375
  161.       Left            =   120
  162.       TabIndex        =   4
  163.       Top             =   1200
  164.       Width           =   1215
  165.    End
  166.    Begin Label Label11 
  167.       Caption         =   "Date Serial"
  168.       Height          =   255
  169.       Left            =   3720
  170.       TabIndex        =   20
  171.       Top             =   720
  172.       Width           =   1095
  173.    End
  174.    Begin Label Label2 
  175.       BackColor       =   &H00FFFFFF&
  176.       Caption         =   "Point4"
  177.       Height          =   375
  178.       Left            =   120
  179.       TabIndex        =   3
  180.       Top             =   720
  181.       Width           =   1215
  182.    End
  183.    Begin Label Label10 
  184.       Caption         =   "Integer"
  185.       Height          =   375
  186.       Left            =   3720
  187.       TabIndex        =   18
  188.       Top             =   240
  189.       Width           =   1095
  190.    End
  191.    Begin Label Label1 
  192.       BackColor       =   &H00FFFFFF&
  193.       Caption         =   "Point2"
  194.       Height          =   375
  195.       Left            =   120
  196.       TabIndex        =   2
  197.       Top             =   240
  198.       Width           =   1215
  199.    End
  200. Sub SetCoor ()
  201.   Cls
  202.   For i% = 1 To 10
  203.    Print
  204.   Next i%
  205.   Print Tab(43);
  206. End Sub
  207. Sub Text1_KeyPress (KeyAscii As Integer)
  208.     Point2KP Text1, 10, KeyAscii
  209. End Sub
  210. Sub Text1_LostFocus ()
  211.   Temp# = Point2LF(Text1, 1, 400.25)
  212.   SetCoor
  213.   Print "Point 2 = "; Temp#
  214. End Sub
  215. Sub Text10_KeyPress (KeyAscii As Integer)
  216.   IntKP Text10, 6, KeyAscii
  217. End Sub
  218. Sub Text10_LostFocus ()
  219.     Temp% = IntLF(Text10, 10, 1000)
  220.     SetCoor
  221.     Print "Integer = "; Temp%
  222. End Sub
  223. Sub Text11_KeyPress (KeyAscii As Integer)
  224.   DateSerKP Text11, KeyAscii
  225. End Sub
  226. Sub Text11_LostFocus ()
  227.   DateSerialNumber# = DateSerLF(Text11, "910101")
  228.   SetCoor
  229.   Print "Date Serial # = "; DateSerialNumber#
  230.   Print Tab(43); Format$(DateSerialNumber#, "dddd, mmmm, dd, yyyy")
  231. End Sub
  232. Sub Text2_KeyPress (KeyAscii As Integer)
  233.   Point4KP Text2, 10, KeyAscii
  234. End Sub
  235. Sub Text2_LostFocus ()
  236.   Temp# = Point4LF(Text2, 1, 1000)
  237.   SetCoor
  238.   Print "Point 4 = "; Temp#
  239. End Sub
  240. Sub Text3_KeyPress (KeyAscii As Integer)
  241.   StrKP Text3, 20, KeyAscii
  242. End Sub
  243. Sub Text3_LostFocus ()
  244.   Temp$ = Text3.Text
  245.   SetCoor
  246.   Print "Text = "; Temp$
  247. End Sub
  248. Sub Text4_KeyPress (KeyAscii As Integer)
  249.   LongKP Text4, 10, KeyAscii
  250. End Sub
  251. Sub Text4_LostFocus ()
  252.    Temp& = LongLF(Text4, 10, 100)
  253.    SetCoor
  254.    Print "Long Integer = "; Temp&
  255. End Sub
  256. Sub Text5_KeyPress (KeyAscii As Integer)
  257.     DateKP Text5, KeyAscii
  258. End Sub
  259. Sub Text5_LostFocus ()
  260.     Temp$ = DateLF(Text5, "910101")
  261.     SetCoor
  262.     Print "Returned Date = "; Temp$
  263. End Sub
  264. Sub Text6_KeyPress (KeyAscii As Integer)
  265.   MultPriceKP Text6, KeyAscii
  266. End Sub
  267. Sub Text6_LostFocus ()
  268.     Temp$ = MultPriceLF(Text6)
  269.     SetCoor
  270.     Print "Multiple/Price = "; Temp$
  271. End Sub
  272. Sub Text7_KeyPress (KeyAscii As Integer)
  273.   UCStrKP Text7, 20, KeyAscii
  274. End Sub
  275. Sub Text7_LostFocus ()
  276.     Temp$ = Text7.Text
  277.     SetCoor
  278.     Print "Upper case string = "; Temp$
  279. End Sub
  280. Sub Text8_KeyPress (KeyAscii As Integer)
  281.   Curr2KP Text8, 10, KeyAscii
  282. End Sub
  283. Sub Text8_LostFocus ()
  284.     Temp@ = Curr2LF(Text8, -200, 115.5)
  285.     SetCoor
  286.     Print "Currency 2 = "; Temp@
  287. End Sub
  288. Sub Text9_KeyPress (KeyAscii As Integer)
  289.   Curr4KP Text9, 10, KeyAscii
  290. End Sub
  291. Sub Text9_LostFocus ()
  292.     Temp@ = Curr4LF(Text9, 1, 125.5555)
  293.     SetCoor
  294.     Print "Currency 4 = "; Temp@
  295. End Sub
  296.