Problem with textbox
I ahve a problem with a text box control that I am using in a user control. When I apply the user control and I move the mouse over the control, the text that is contained in the text box vanishes. When I click in the text box, the text reappears.
I do not have any events that deal with any mouse movment, hover, etc. for this control.
Can any one help with this?
You're going to have to provide a little more information about what makes your case unique. Text boxes normally work perfectly fine in UserControls.
You've checked all of the events in the Form and the UserControl, right? Are you doing any multithreading in VS2003? Any unmanaged code or p/invoke calls? Any transparency? Is it actually derived from UserControl, or is it derived from another control? Are there any other controls besides the textbox in the UserControl?
Here is what I have done to create this control
1) Created a new user control
2) Palced multiple text boxes, comboboxes, and numericUpDowns
3) added code to implement a class library that I ahve created
That's it. The clas library will add text to the textbox based on what is selected in the combobox, but that's it. I am creating/comliing this on a Vista Ultimate machine, would that have any effect? I have updated to VS2005 sp1.
Thanks.
Hi, anubisascends,
I tried to build a small sample in Vista just as you described, and it just works fine.
Please post some codes if possible which can be helpful to isolate the problem.
And if you want to find out if this issue is related to OS, please try to run it in WinXP or Win2K.
Regards
ello, i had the same problem quite some time back! and iv had one recently where the textbox gets filled with text "ADC" even tho i had nothing going into it!
is it only doing it for that textbox? test it out by doing a try function, set 2 or 4 textboxes with seprate code and see if its all of them then you might be bad but if its only for that then just delet it and remake a new one so its got not refrences assosiated to it
Here are the two projects that I created for this:
http://rapidshare.com/files/45656843/anubisascends.zip
swlib in the class library that has the information, and swcuictrl is the user control. If you add the user control to any form, you can see the result.
Thanks for taking the time to look at this.