Re: Transparent Labels!!!
Nice and simple example wossy :thumb:
I had a question, why do you dissallow the user to see the text changes in design time?
Re: Transparent Labels!!!
Woosname....
Thats a good start.
Can't wait until it is finished
Thanks
Re: Transparent Labels!!!
Quote:
Originally Posted by RobDog888
Nice and simple example wossy :thumb:
I had a question, why do you dissallow the user to see the text changes in design time?
I didn't, not deliberately anyway, its that I didn't get round to making it public. I was only aiming to get the effect, I wasn't trying to make a full control ;)
Epix: You'll have to wait I'm afraid. I have no plans to finish this at the moment.
2 Attachment(s)
Re: Transparent Labels!!!
Wossname, here is the updated/modified control project.
- Added design time transparency support.
- Added support for the Text and ForeColor properties.
- Added updates to the Text and ForeColor properties in design time.
- Added ReadOnly attributes to the BackColor and BackgroundImage properties since they are not part of the controls needed properties.
- Added descriptions to the properties in the IDE properties help text window.
- Added defaults to the Text and ForeColor properties.
- Added a backbuffer to optimize and reduce flickering.
Let me know what you guys think. :thumb:
http://www.vbforums.com/attachment.p...chmentid=35011
Re: Transparent Labels!!!
this is pretty cool!
good job, guys.
Re: Transparent Labels!!!
Nice job.
Is there a way to give the text the same clarity an resolution as standard labels, just with a transparent background?
Also why does the text always show up smaller than the selected font size? :)
Re: Transparent Labels!!!
Welcome to the Forums eddie2000au.
The jaggie text can not be smoothed because of the method used to draw and cut the text. Its using the
DrawText method of the graphicspath object which does not support AntiAliasing. :(
The font size issue is because we didnt add support for fontsize, only fontcolor.
Glad you like it though. Maybe at some point we can determine a different method for transparency that will
allow us to smooth the text.
Re: Transparent Labels!!!
Quote:
Originally Posted by eddie2000au
Also why does the text always show up smaller than the selected font size? :)
I also found this in my own version of the control (derived directly from Class Control rather than usercontrol). Frankly I have no idea. You can set the size of the font in the properties window like with any control, but it always seems to come out about 20% smaller at runtime than it does in designmode. Weird. Must be something to do with the way GraphicsPath.AddString works.
As Rob said, antialiasing in this articular situation is impossible because there is no available background to composite with. This is a problem that would take quite a lot of time and API to fix. It is possible though, and it would probably cause a lot of overhead. :(
Re: Transparent Labels!!!
Hey wossname, any new ideas on other methods for drawing the text only.
Perhaps some way to utilize a lables transparency to actually copy the colors behind it except for the text?
Re: Transparent Labels!!!
Quote:
Originally Posted by RobDog888
Hey wossname, any new ideas on other methods for drawing the text only.
Perhaps some way to utilize a lables transparency to actually copy the colors behind it except for the text?
Nope. I haven't given it any further thought. Doubt I'd ever need such a control anyway.