home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH3 / 3-6-5.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-17  |  1.7 KB  |  55 lines

  1. VERSION 5.00
  2. Begin VB.Form frm3_6_5 
  3.    Caption         =   "3-6-5"
  4.    ClientHeight    =   2145
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   3885
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   2145
  20.    ScaleWidth      =   3885
  21.    Begin VB.PictureBox picResults 
  22.       Height          =   1095
  23.       Left            =   120
  24.       ScaleHeight     =   1035
  25.       ScaleWidth      =   3435
  26.       TabIndex        =   1
  27.       Top             =   120
  28.       Width           =   3495
  29.    End
  30.    Begin VB.CommandButton cmdEvaluate 
  31.       Caption         =   "Evaluate Functions"
  32.       Height          =   495
  33.       Left            =   960
  34.       TabIndex        =   0
  35.       Top             =   1440
  36.       Width           =   2055
  37.    End
  38. Attribute VB_Name = "frm3_6_5"
  39. Attribute VB_GlobalNameSpace = False
  40. Attribute VB_Creatable = False
  41. Attribute VB_PredeclaredId = True
  42. Attribute VB_Exposed = False
  43. Sub cmdEvaluate_Click()
  44.   Dim str1 As String, str2 As String
  45.   'Evaluate functions at variables and expressions.
  46.   picResults.Cls
  47.   str1 = "Quick as "
  48.   str2 = "a wink"
  49.   picResults.Print Left(str1, 7)
  50.   picResults.Print Mid(str1 & str2, 7, 6)
  51.   picResults.Print UCase(str1 & str2)
  52.   picResults.Print "The average "; Right(str2, 4); " lasts .1 second."
  53.   picResults.Print Trim(str1); str2
  54. End Sub
  55.