|
-
Oct 16th, 2008, 01:33 PM
#1
Thread Starter
Lively Member
[RESOLVED] [2008] Textbox issue
Ok I have a textbox that when someone types in it another textbox will have the exact same text. Easy I know.
Code:
Private Sub TextBox9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox9.TextChanged
TextBox12.Text = TextBox9.Text
End Sub
That works fine normally but I am using My.Settings on each text box that get loaded upon the form load. Is there anyway around this from not messing up?
For some reason it doesnt work properly if your using My.Settings but still would like to use the function.
Thanks.
-
Oct 16th, 2008, 01:40 PM
#2
Re: [2008] Textbox issue
what does messing up mean?
-
Oct 16th, 2008, 01:43 PM
#3
Thread Starter
Lively Member
Re: [2008] Textbox issue
When you enter text into textbox9, textbox12 changes but then textbox9 clears it self. It seems only 1 character can be entered into textbox9, then it clears itself out. And textbox12 only hold the last character you typed.
-
Oct 16th, 2008, 01:55 PM
#4
Re: [2008] Textbox issue
is all the text in textbox9 highlighted before it happens?
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Oct 16th, 2008, 01:59 PM
#5
Thread Starter
Lively Member
Re: [2008] Textbox issue
Nothing is highlighted in textbox9, just a flashing cursor.
There is no text in textbox9 when the form loads but there is text in textbox12 when it loads.
-
Oct 16th, 2008, 02:25 PM
#6
Re: [2008] Textbox issue
I think you should post the entire form's code that's relevant to Textbox9 and Textbox12
-
Oct 16th, 2008, 02:33 PM
#7
-
Oct 16th, 2008, 02:34 PM
#8
Thread Starter
Lively Member
Re: [2008] Textbox issue
This is the complete code for what im trying to do:
vb Code:
Private Sub TextBox9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox9.TextChanged
TextBox12.Text = TextBox9.Text
End Sub
That works great but when you bind those two textboxes to the application settings it doesnt work properly. Try it for you self. Make two text boxes, then add the above code and run the program, it works fine.
But then when you set each textbox to be remember and saved when the program loads under the application settings it doesnt work.
-
Oct 16th, 2008, 02:42 PM
#9
Re: [2008] Textbox issue
where do you load the textbox from my.settings
-
Oct 16th, 2008, 02:44 PM
#10
Thread Starter
Lively Member
Re: [2008] Textbox issue
I use the following code on the form load
on form close:
-
Oct 16th, 2008, 02:46 PM
#11
Thread Starter
Lively Member
Re: [2008] Textbox issue
I should say that I dont have any problems reloading the text back into any textboxes.
Just when added the textbox12.text = textbox9.text it doesnt do what its supposed to.
-
Oct 16th, 2008, 02:47 PM
#12
Re: [2008] Textbox issue
 Originally Posted by nutt318
This is the complete code for what im trying to do:
vb Code:
Private Sub TextBox9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox9.TextChanged
TextBox12.Text = TextBox9.Text
End Sub
That works great but when you bind those two textboxes to the application settings it doesnt work properly. Try it for you self. Make two text boxes, then add the above code and run the program, it works fine.
But then when you set each textbox to be remember and saved when the program loads under the application settings it doesnt work.
So don't bind them, in the form load event manually set their Text properties then in the form close event manually grab the Text
-
Oct 16th, 2008, 02:58 PM
#13
Thread Starter
Lively Member
Re: [2008] Textbox issue
But I need to save these settings that are entered. If a user changes the settings and closes the program these need to be saved. So what your saying I dont think will work for me. Unless im not getting something.
-
Oct 16th, 2008, 03:20 PM
#14
Thread Starter
Lively Member
Re: [2008] Textbox issue
Found the Fix:
Removed the my settings binding from textbox12 and then on form load and close i saved that textbox12.text to a my.setting.
Works good now, thanks JuggaloBrotha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|