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 / CH7 / 7-4-1.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-18  |  2.6 KB  |  88 lines

  1. VERSION 5.00
  2. Begin VB.Form frm7_4_1 
  3.    Caption         =   "Swap"
  4.    ClientHeight    =   2115
  5.    ClientLeft      =   2595
  6.    ClientTop       =   1770
  7.    ClientWidth     =   2655
  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     =   2115
  20.    ScaleWidth      =   2655
  21.    Begin VB.PictureBox picResult 
  22.       Height          =   255
  23.       Left            =   120
  24.       ScaleHeight     =   195
  25.       ScaleWidth      =   2355
  26.       TabIndex        =   5
  27.       Top             =   1680
  28.       Width           =   2415
  29.    End
  30.    Begin VB.CommandButton cmdAlphabetize 
  31.       Caption         =   "Alphabetize"
  32.       Height          =   495
  33.       Left            =   600
  34.       TabIndex        =   4
  35.       Top             =   1080
  36.       Width           =   1215
  37.    End
  38.    Begin VB.TextBox txtSecondWord 
  39.       Height          =   285
  40.       Left            =   1320
  41.       TabIndex        =   3
  42.       Top             =   600
  43.       Width           =   1215
  44.    End
  45.    Begin VB.TextBox txtFirstWord 
  46.       Height          =   285
  47.       Left            =   1320
  48.       TabIndex        =   1
  49.       Top             =   120
  50.       Width           =   1215
  51.    End
  52.    Begin VB.Label lblSecondWord 
  53.       Alignment       =   1  'Right Justify
  54.       Caption         =   "Second word"
  55.       Height          =   255
  56.       Left            =   0
  57.       TabIndex        =   2
  58.       Top             =   600
  59.       Width           =   1215
  60.    End
  61.    Begin VB.Label lblFirstWord 
  62.       Alignment       =   1  'Right Justify
  63.       Caption         =   "First word"
  64.       Height          =   255
  65.       Left            =   0
  66.       TabIndex        =   0
  67.       Top             =   120
  68.       Width           =   1215
  69.    End
  70. Attribute VB_Name = "frm7_4_1"
  71. Attribute VB_GlobalNameSpace = False
  72. Attribute VB_Creatable = False
  73. Attribute VB_PredeclaredId = True
  74. Attribute VB_Exposed = False
  75. Private Sub cmdAlphabetize_Click()
  76.   Dim firstWord As String, secondWord As String, temp As String
  77.   'Alphabetize two words
  78.   firstWord = txtFirstWord.Text
  79.   secondWord = txtSecondWord.Text
  80.   If firstWord > secondWord Then
  81.       temp = firstWord
  82.       firstWord = secondWord
  83.       secondWord = temp
  84.   End If
  85.   picResult.Cls
  86.   picResult.Print firstWord; " before "; secondWord
  87. End Sub
  88.