We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Transparent Textbox

I'm trying to reproduce functionality that I had in VB6. I used to use the Textbox control that came with Forms 2.0 control (fm20.dll) it had an attribute that allowed you to set the background to transparent (fmBackStyleTransparent) I need to this same functionality in vb.net. In particular I need to be able to display foreground text with a gradient background or a bitmap. Any ideas? - Phillip

2 Replies

PS Prakash S Syncfusion Team April 19, 2002 12:14 PM UTC

Philip, I doubt whether this effect can be achieved using the .NET TextBox as this is just a wrapper around the Win32 EDIT control. The Win32 EDIT control paints it's background everytime the text changes and working around this behavior, while still retaining the control's full functionality, is a non-trivial affair and will involve extensive customization. Unfortunately, I am not aware of any code samples that show this. I suggest that you check out the various Win32 newsgroups/forums or go in for some 3rd party controls that have the functionality pre-built. Prakash Syncfusion, Inc.


LM Lacy McClarty August 15, 2002 09:07 PM UTC

> I'm trying to reproduce functionality that I had in VB6. I used to use the Textbox control that came with Forms 2.0 control (fm20.dll) it had an attribute that allowed you to set the background to transparent (fmBackStyleTransparent) I need to this same functionality in vb.net. In particular I need to be able to display foreground text with a gradient background or a bitmap. > > Any ideas? > - Phillip If you're willing to move your textbox to a seperate form, you can take advantage of setting an entire form to transparent. Your textbox control would follow suit and still allow the text font to display. This workaround has side effects. For example, you'd need to use the Form's TopMost property to ensure the textbox would still be visible. Lacy >

Loader.
Live Chat Icon For mobile
Up arrow icon