Public Class Form1
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        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.
  Friend WithEvents Label1 As System.Windows.Forms.Label
  Friend WithEvents Label2 As System.Windows.Forms.Label
  Friend WithEvents txtString1 As System.Windows.Forms.TextBox
  Friend WithEvents txtString2 As System.Windows.Forms.TextBox
  Friend WithEvents Label3 As System.Windows.Forms.Label
  Friend WithEvents txtArg1 As System.Windows.Forms.TextBox
  Friend WithEvents txtArg2 As System.Windows.Forms.TextBox
  Friend WithEvents Label4 As System.Windows.Forms.Label
  Friend WithEvents btnCalc As System.Windows.Forms.Button
  Friend WithEvents btnExit As System.Windows.Forms.Button
  Friend WithEvents txtResult As System.Windows.Forms.TextBox
  Friend WithEvents Label5 As System.Windows.Forms.Label
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.Label1 = New System.Windows.Forms.Label()
    Me.Label2 = New System.Windows.Forms.Label()
    Me.txtString1 = New System.Windows.Forms.TextBox()
    Me.txtString2 = New System.Windows.Forms.TextBox()
    Me.Label3 = New System.Windows.Forms.Label()
    Me.txtArg1 = New System.Windows.Forms.TextBox()
    Me.txtArg2 = New System.Windows.Forms.TextBox()
    Me.Label4 = New System.Windows.Forms.Label()
    Me.btnCalc = New System.Windows.Forms.Button()
    Me.btnExit = New System.Windows.Forms.Button()
    Me.txtResult = New System.Windows.Forms.TextBox()
    Me.Label5 = New System.Windows.Forms.Label()
    Me.SuspendLayout()
    '
    'Label1
    '
    Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label1.Location = New System.Drawing.Point(8, 8)
    Me.Label1.Name = "Label1"
    Me.Label1.Size = New System.Drawing.Size(64, 20)
    Me.Label1.TabIndex = 0
    Me.Label1.Text = "String #1:"
    Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'Label2
    '
    Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label2.Location = New System.Drawing.Point(8, 32)
    Me.Label2.Name = "Label2"
    Me.Label2.Size = New System.Drawing.Size(64, 20)
    Me.Label2.TabIndex = 1
    Me.Label2.Text = "String #2:"
    Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'txtString1
    '
    Me.txtString1.Location = New System.Drawing.Point(72, 8)
    Me.txtString1.Name = "txtString1"
    Me.txtString1.Size = New System.Drawing.Size(208, 20)
    Me.txtString1.TabIndex = 2
    Me.txtString1.Text = ""
    '
    'txtString2
    '
    Me.txtString2.Location = New System.Drawing.Point(72, 32)
    Me.txtString2.Name = "txtString2"
    Me.txtString2.Size = New System.Drawing.Size(208, 20)
    Me.txtString2.TabIndex = 3
    Me.txtString2.Text = ""
    '
    'Label3
    '
    Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label3.Location = New System.Drawing.Point(8, 56)
    Me.Label3.Name = "Label3"
    Me.Label3.Size = New System.Drawing.Size(64, 20)
    Me.Label3.TabIndex = 4
    Me.Label3.Text = "Arg #1:"
    Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'txtArg1
    '
    Me.txtArg1.Location = New System.Drawing.Point(72, 56)
    Me.txtArg1.Name = "txtArg1"
    Me.txtArg1.Size = New System.Drawing.Size(72, 20)
    Me.txtArg1.TabIndex = 5
    Me.txtArg1.Text = ""
    '
    'txtArg2
    '
    Me.txtArg2.Location = New System.Drawing.Point(216, 56)
    Me.txtArg2.Name = "txtArg2"
    Me.txtArg2.Size = New System.Drawing.Size(64, 20)
    Me.txtArg2.TabIndex = 7
    Me.txtArg2.Text = ""
    '
    'Label4
    '
    Me.Label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label4.Location = New System.Drawing.Point(144, 56)
    Me.Label4.Name = "Label4"
    Me.Label4.Size = New System.Drawing.Size(72, 20)
    Me.Label4.TabIndex = 6
    Me.Label4.Text = "Arg #2: "
    Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'btnCalc
    '
    Me.btnCalc.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.btnCalc.Location = New System.Drawing.Point(8, 112)
    Me.btnCalc.Name = "btnCalc"
    Me.btnCalc.Size = New System.Drawing.Size(104, 23)
    Me.btnCalc.TabIndex = 8
    Me.btnCalc.Text = "&Calculate"
    '
    'btnExit
    '
    Me.btnExit.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.btnExit.Location = New System.Drawing.Point(176, 112)
    Me.btnExit.Name = "btnExit"
    Me.btnExit.Size = New System.Drawing.Size(104, 23)
    Me.btnExit.TabIndex = 9
    Me.btnExit.Text = "E&xit"
    '
    'txtResult
    '
    Me.txtResult.Location = New System.Drawing.Point(72, 80)
    Me.txtResult.Name = "txtResult"
    Me.txtResult.Size = New System.Drawing.Size(208, 20)
    Me.txtResult.TabIndex = 11
    Me.txtResult.Text = ""
    '
    'Label5
    '
    Me.Label5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    Me.Label5.Location = New System.Drawing.Point(8, 80)
    Me.Label5.Name = "Label5"
    Me.Label5.Size = New System.Drawing.Size(64, 20)
    Me.Label5.TabIndex = 10
    Me.Label5.Text = "Result:"
    Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'Form1
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(292, 141)
    Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.txtResult, Me.Label5, Me.btnExit, Me.btnCalc, Me.txtArg2, Me.Label4, Me.txtArg1, Me.Label3, Me.txtString2, Me.txtString1, Me.Label2, Me.Label1})
    Me.Name = "Form1"
    Me.Text = "My String Program"
    Me.ResumeLayout(False)

  End Sub

#End Region

  Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click
    Dim buff As String

    buff = txtString1.Text
    txtResult.Text = buff.Replace(txtArg1.Text, txtArg2.Text)
  End Sub

  Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    Me.Dispose()
  End Sub
End Class
