|
-
May 21st, 2011, 06:29 AM
#1
Thread Starter
PowerPoster
[VB6] - Hide textbox(or other control) backcolor
can i hide the textbox(or picturebox) backcolor?
(it's a question that normaly i found the code for a form)
-
May 21st, 2011, 06:37 AM
#2
Fanatic Member
Re: [VB6] - Hide textbox(or other control) backcolor
May be by setting the control's transparency key to the color, but I believe it only works on forms. Problem is that Windows doesn't use the Alpha component of colors when drawing...
It can be done if you add the picturebox to a form, with as backcolor an unused color (like pink) and give the form a transparency key of that color. Then you make sure this form stays on top of your main form (as if it is a control) by handling the position/sizechanged events of the main form.
The best solution is a custom control, but for a textbox this can take a while.
If you want multiple controls to have this, simply make one top-layer form which contains the controls (and see-through spots) with a background form having the background to display. (like an image of some sort)
No API is involved here though.
Last edited by bergerkiller; May 21st, 2011 at 06:42 AM.
-
May 21st, 2011, 06:43 AM
#3
Thread Starter
PowerPoster
Re: [VB6] - Hide textbox(or other control) backcolor
 Originally Posted by bergerkiller
May be by setting the control's transparency key to the color, but I believe it only works on forms. Problem is that Windows doesn't use the Alpha component of colors when drawing...
It can be done if you add the picturebox to a form, with as backcolor an unused color (like pink) and give the form a transparency key of that color. Then you make sure this form stays on top of your main form (as if it is a control) by handling the position/sizechanged events of the main form.
The best solution is a custom control, but for a textbox this can take a while.
If you want multiple controls to have this, simply make one top-layer form which contains the controls (and see-through spots) with a background form having the background to display. (like an image of some sort)
No API is involved here though. 

and there is any transparent textbox(activex control) 100% free?(if you know)
-
May 21st, 2011, 06:47 AM
#4
Fanatic Member
Re: [VB6] - Hide textbox(or other control) backcolor
You can try to search for it. Here is one for example:
http://www.codeproject.com/KB/edit/a...ndtextbox.aspx
-
May 21st, 2011, 06:49 AM
#5
Thread Starter
PowerPoster
Re: [VB6] - Hide textbox(or other control) backcolor
 Originally Posted by bergerkiller
these is for .NET not for VB6
-
May 23rd, 2011, 01:59 PM
#6
Re: [VB6] - Hide textbox(or other control) backcolor
 Originally Posted by joaquim
can i hide the textbox(or picturebox) backcolor?
(it's a question that normaly i found the code for a form)
Though this is not a truly transparent picturebox, but it may be something to play with.
-
May 23rd, 2011, 02:28 PM
#7
Thread Starter
PowerPoster
Re: [VB6] - Hide textbox(or other control) backcolor
 Originally Posted by LaVolpe
hi LaVolpe. how are you?
it's very cool... but if i want a textbox backcolor transparent?
you speak about UC, but i wanted a controls.. sorry
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|