Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Convert to Pig Latin. Dim word, first As String word = InputBox("Enter a word (use all lowercase):") first = word.Substring(0, 1) If "aeiou".IndexOf(first) <> -1 Then word &= "way" Else word = word.Substring(1) & first & "ay" End If txtoutput.Text = "The Word in pig latin is " & word & "." End Sub End Class _ Partial Class Form1 Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) If disposing AndAlso components IsNot Nothing Then components.Dispose() End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. _ Private Sub InitializeComponent() Me.Button1 = New System.Windows.Forms.Button Me.txtoutput = New System.Windows.Forms.TextBox Me.SuspendLayout() ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.Black Me.Button1.Font = New System.Drawing.Font("Arial Black", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(234, Byte), Integer), CType(CType(26, Byte), Integer), CType(CType(94, Byte), Integer)) Me.Button1.Location = New System.Drawing.Point(176, 79) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(162, 76) Me.Button1.TabIndex = 0 Me.Button1.Text = "Click Me" Me.Button1.UseVisualStyleBackColor = False ' 'txtoutput ' Me.txtoutput.Location = New System.Drawing.Point(12, 197) Me.txtoutput.Name = "txtoutput" Me.txtoutput.Size = New System.Drawing.Size(498, 20) Me.txtoutput.TabIndex = 1 ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.FromArgb(CType(CType(231, Byte), Integer), CType(CType(20, Byte), Integer), CType(CType(83, Byte), Integer)) Me.ClientSize = New System.Drawing.Size(522, 320) Me.Controls.Add(Me.txtoutput) Me.Controls.Add(Me.Button1) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents txtoutput As System.Windows.Forms.TextBox End Class