Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi,
I am using visual basic .net. Visual studio 2005. Framework Version: 2.0 service pack 2

I want to put a textbox onto glass. However, when I do, the textbox text also goes to glass effect. I have searched online and everywhere I look, people says to change the Forms TransparencyKey. I tried this, it doesnt work for me. Any suggestions on how to get this to work right? (If only there were a way to use the Delphi Textbox in vb.net. I've messed around with the Delphi IDE and the form designer allows you to set glass and you can put a textbox in the glass, and it renders the right way)
Posted
Updated 18-Jul-11 14:34pm
v3
Comments
Christian Graus 13-Jul-11 21:14pm    
Did you consider telling us what language/framework you're using ?

As far as I know, to make it works properly, the control must not be based on a window handle (HWND).

Thus, I can see 3 solutions:

  • Uses WPF instead of WinForms
  • Hide the text box and display it only when editing with an opaque background. I would think that this is the approch taken by Windows Explorer
  • Implement your own text box which is not based on an handle
 
Share this answer
 
Didnt exactly solve it on my own, however after enough digging around on the internet, i found a solution to the textbox rendering on glass. it works on windows 7. not sure about vista. here is the link where i found the solution Solution . it is in c#, but easily ported to vb.net. there is also a link to download a sample project.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900