I have this little app with a textbox that changes colors (text color and background color) depending on some parameters. I also have visualstyles enabled in my app like this:
Public Sub Main()
Application.EnableVisualStyles()
Application.Run(frmMain)
End Sub
The problem is the following, I don't the user to be able to edit that field at all, and I can just put readonly = true, however, the user can select the text inside and the cursro carret will be there and I also don't want that. That can be fixed with enabled = false. However, if I put it like that, I can't change the text color... How can I achieve this?
Another thing, with Application.EnableVisualStyles() when the background color of the textbox is changed during runtime, there will be a 1pixel border line with the previous background color and if I move the cursor hover the textbox, that border will now have the correct color, I don't want that to happen too and if somehow I mange to fix the enabled = false and text color on the textbox the hover thing will not work and the border with the previous color will remain there.
sucks! i never ended up using it, but when it was announced i was excited to see a new and refreshing browser. i guess we'll see what Dia has to offer but at first glance, seems like an operator type browser.
maybe tis the end of the browsers as we know it, you know with Opera's Neo and all. exciting times.....i guess......
Question
ProclaimDragon
I have this little app with a textbox that changes colors (text color and background color) depending on some parameters. I also have visualstyles enabled in my app like this:
Public Sub Main() Application.EnableVisualStyles() Application.Run(frmMain) End Sub
The problem is the following, I don't the user to be able to edit that field at all, and I can just put readonly = true, however, the user can select the text inside and the cursro carret will be there and I also don't want that. That can be fixed with enabled = false. However, if I put it like that, I can't change the text color... How can I achieve this?
Another thing, with Application.EnableVisualStyles() when the background color of the textbox is changed during runtime, there will be a 1pixel border line with the previous background color and if I move the cursor hover the textbox, that border will now have the correct color, I don't want that to happen too and if somehow I mange to fix the enabled = false and text color on the textbox the hover thing will not work and the border with the previous color will remain there.
Any thoughts on this 2 problems?
Link to comment
https://www.neowin.net/forum/topic/268052-vbnet-textbox-disabled-colors/Share on other sites
11 answers to this question
Recommended Posts