First let me apologize for not putting the following code into "code tags", or what ever is used to format code...I looked in the FAQ and it talked about it, but did not give clear instructions and I can find no apparent method of doing so. So, firstly would someone explain how to wrap code tags (or how it is done), around my code. Whoops!, I think I found it.
Nevertheless, below is the code of a form from my project. The problem I am having is with the string variable, "filePath" (as declared second line down). when I run the program, and enter a string, such as, "c:\stuff" into textbox2, when I set a break point and do a watch on " filePath = Me.TextBox2.Text", (3rd line from the bottom) the watch indicates that Me.TextBox.Text has the string (c:\stuff) but it is not assigned to the "filePath" variable. Can someone please show me why not?
Nevertheless, below is the code of a form from my project. The problem I am having is with the string variable, "filePath" (as declared second line down). when I run the program, and enter a string, such as, "c:\stuff" into textbox2, when I set a break point and do a watch on " filePath = Me.TextBox2.Text", (3rd line from the bottom) the watch indicates that Me.TextBox.Text has the string (c:\stuff) but it is not assigned to the "filePath" variable. Can someone please show me why not?
Code:
'****************************************************************
Public Class Form5
Friend filePath As String
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Hide()
Form1.Show()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
Public Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pwTextBox1.TextChanged
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Hide()
Form2.Show()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Me.Hide()
Form4.Show()
End Sub
Private Sub GroupBox2_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs)
pwTextBox1.Focus()
End Sub
Private Sub SplitContainer1_Panel2_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)
End Sub
Private Sub SplitContainer1_Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)
End Sub
Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter
End Sub
Private Sub Label4_Click(sender As System.Object, e As System.EventArgs)
End Sub
Private Sub Button6_Click(sender As System.Object, e As System.EventArgs) Handles Button6.Click
'Takes text from text box and puts it in a string variable.
strPassWordVar = Me.pwTextBox1.Text
'Checks to make sure text box had an entry.
If Me.pwTextBox1.Text = "" Then
MessageBox.Show("You must enter a password.")
End If
End Sub
Private Sub Button7_Click(sender As System.Object, e As System.EventArgs) Handles Button7.Click
filePath = Me.TextBox2.Text
End Sub
End Class