well I have a assignment one part of the assignment is a user inouts a word, then types in what letter he wants to find in another text box and I am supposed to have a msg box pop up telling him in what position that letter is in, this what I have programmed so far
thanks and I know I suck
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 txtEntNum As System.Windows.Forms.TextBox
Friend WithEvents txtSeaLet As System.Windows.Forms.TextBox
Friend WithEvents btnSum As System.Windows.Forms.Button
Friend WithEvents btnFind As System.Windows.Forms.Button
Friend WithEvents txtTexSer As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.txtEntNum = New System.Windows.Forms.TextBox
Me.txtTexSer = New System.Windows.Forms.TextBox
Me.txtSeaLet = New System.Windows.Forms.TextBox
Me.btnSum = New System.Windows.Forms.Button
Me.btnFind = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'txtEntNum
'
Me.txtEntNum.Location = New System.Drawing.Point(32, 32)
Me.txtEntNum.Name = "txtEntNum"
Me.txtEntNum.Size = New System.Drawing.Size(256, 20)
Me.txtEntNum.TabIndex = 0
Me.txtEntNum.Text = "Enter Number"
'
'txtTexSer
'
Me.txtTexSer.Location = New System.Drawing.Point(32, 80)
Me.txtTexSer.Name = "txtTexSer"
Me.txtTexSer.Size = New System.Drawing.Size(256, 20)
Me.txtTexSer.TabIndex = 1
Me.txtTexSer.Text = "Enter Text to be Searched"
'
'txtSeaLet
'
Me.txtSeaLet.Location = New System.Drawing.Point(32, 120)
Me.txtSeaLet.Name = "txtSeaLet"
Me.txtSeaLet.Size = New System.Drawing.Size(144, 20)
Me.txtSeaLet.TabIndex = 2
Me.txtSeaLet.Text = "Enter Search Letter"
'
'btnSum
'
Me.btnSum.Location = New System.Drawing.Point(320, 32)
Me.btnSum.Name = "btnSum"
Me.btnSum.Size = New System.Drawing.Size(80, 24)
Me.btnSum.TabIndex = 3
Me.btnSum.Text = "Sum"
'
'btnFind
'
Me.btnFind.Location = New System.Drawing.Point(320, 80)
Me.btnFind.Name = "btnFind"
Me.btnFind.Size = New System.Drawing.Size(80, 24)
Me.btnFind.TabIndex = 4
Me.btnFind.Text = "Find"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(440, 182)
Me.Controls.Add(Me.btnFind)
Me.Controls.Add(Me.btnSum)
Me.Controls.Add(Me.txtSeaLet)
Me.Controls.Add(Me.txtTexSer)
Me.Controls.Add(Me.txtEntNum)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub txtEntNum_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEntNum.TextChanged
End Sub
Private Sub txtTexser_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTexSer.TextChanged
Dim txtEntNum As Integer
End Sub
Private Sub txtSeaLet_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSeaLet.TextChanged
Dim txtEntNum As String
End Sub
Private Sub btnSum_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSum.Click
MsgBox("Sum Of Numbers: " & txtEntNum.Text * (txtEntNum.Text + 1) / 2)
End Sub
Private Sub btnFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFind.Click
Dim txtTexSer As string
Dim txtSeaLet As String
End Sub
End Class
thanks and I know I suck
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 txtEntNum As System.Windows.Forms.TextBox
Friend WithEvents txtSeaLet As System.Windows.Forms.TextBox
Friend WithEvents btnSum As System.Windows.Forms.Button
Friend WithEvents btnFind As System.Windows.Forms.Button
Friend WithEvents txtTexSer As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.txtEntNum = New System.Windows.Forms.TextBox
Me.txtTexSer = New System.Windows.Forms.TextBox
Me.txtSeaLet = New System.Windows.Forms.TextBox
Me.btnSum = New System.Windows.Forms.Button
Me.btnFind = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'txtEntNum
'
Me.txtEntNum.Location = New System.Drawing.Point(32, 32)
Me.txtEntNum.Name = "txtEntNum"
Me.txtEntNum.Size = New System.Drawing.Size(256, 20)
Me.txtEntNum.TabIndex = 0
Me.txtEntNum.Text = "Enter Number"
'
'txtTexSer
'
Me.txtTexSer.Location = New System.Drawing.Point(32, 80)
Me.txtTexSer.Name = "txtTexSer"
Me.txtTexSer.Size = New System.Drawing.Size(256, 20)
Me.txtTexSer.TabIndex = 1
Me.txtTexSer.Text = "Enter Text to be Searched"
'
'txtSeaLet
'
Me.txtSeaLet.Location = New System.Drawing.Point(32, 120)
Me.txtSeaLet.Name = "txtSeaLet"
Me.txtSeaLet.Size = New System.Drawing.Size(144, 20)
Me.txtSeaLet.TabIndex = 2
Me.txtSeaLet.Text = "Enter Search Letter"
'
'btnSum
'
Me.btnSum.Location = New System.Drawing.Point(320, 32)
Me.btnSum.Name = "btnSum"
Me.btnSum.Size = New System.Drawing.Size(80, 24)
Me.btnSum.TabIndex = 3
Me.btnSum.Text = "Sum"
'
'btnFind
'
Me.btnFind.Location = New System.Drawing.Point(320, 80)
Me.btnFind.Name = "btnFind"
Me.btnFind.Size = New System.Drawing.Size(80, 24)
Me.btnFind.TabIndex = 4
Me.btnFind.Text = "Find"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(440, 182)
Me.Controls.Add(Me.btnFind)
Me.Controls.Add(Me.btnSum)
Me.Controls.Add(Me.txtSeaLet)
Me.Controls.Add(Me.txtTexSer)
Me.Controls.Add(Me.txtEntNum)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub txtEntNum_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEntNum.TextChanged
End Sub
Private Sub txtTexser_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTexSer.TextChanged
Dim txtEntNum As Integer
End Sub
Private Sub txtSeaLet_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSeaLet.TextChanged
Dim txtEntNum As String
End Sub
Private Sub btnSum_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSum.Click
MsgBox("Sum Of Numbers: " & txtEntNum.Text * (txtEntNum.Text + 1) / 2)
End Sub
Private Sub btnFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFind.Click
Dim txtTexSer As string
Dim txtSeaLet As String
End Sub
End Class
