Results 1 to 6 of 6

Thread: [RESOLVED] [2008] Glassy text haze

  1. #1

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Resolved [RESOLVED] [2008] Glassy text haze

    Hi, I want to implement a few Glass forms that have transparent backgrounds. But how to I implement this hazey shadow that appears behind text in glassed windows? It enables you to see the text whatever the colour in the background is.

    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2008] Glassy text haze

    There could really only be two ways that that could be done. It could be a GDI+ thing, in which case you'd investigate the Graphics class and some online GDI+ tutorials. I've seen at least one that teaches how to add a halo effect to text, although I'm not sure whether that would support transparency. Alternatively it might be a WPF thing, which would require you to read up about WPF and also to create a WPF application in the first place.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: [2008] Glassy text haze

    I found this article after someone suggested the DrawThemeTextEx API:

    http://www.codeproject.com/KB/vista/...select=1726049

    ...and it works like a dream!

    The example is in C# but it's not hard to translate, or there are plenty of free C# to VB.NET converters on the Internet.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2008] Glassy text haze

    Dom, you may have this all sorted, but I just wanted to include I remembered reading an MSDN magazine article about this type of stuff, may have some additional information for you.

    http://msdn.microsoft.com/en-us/magazine/cc163435.aspx

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [2008] Glassy text haze

    You know why they have the "text haze"? Its because when you draw without it the alpha layer doesnt come out as well so the text haze was drawn behind it to help hide the alpha blending smoothing problem. No just kidding but it does provide that ability if they dont want to go the extra mile and draw the text correctly
    Last edited by RobDog888; Jun 4th, 2008 at 01:00 PM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: [RESOLVED] [2008] Glassy text haze

    Just thought I'd upload the module that enables you to draw the glowing text on a form.

    If anyone has any comments or improvements for the code then please let me know.
    Attached Files Attached Files
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width