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.
I wonder if it is possible to disable it.
Not that I have ring cameras, I do have Blink cameras, which are also owned by Amazon, but I doubt they will put it on them. i also own an Eviz doorbell camera, I hope they don't follow suit and do what Amazon does.
It seems like everything we do these days have AI linked to it, I don't use Whatsapp, but I certainly would not want AI to look at my messages.
Ai is turned off on everything I have, apart from my Echo dots and that is not the same sort of AI.
Messaging services are useful and I thought that all WhatsApp was. I don't use it myself, never have, got no need for it, but I can understand why some people do, but with RCS becoming more popular, then maybe more people will use that.
I just use SMS myself.
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