Solved

Component to make existing radio group box and radio button transparent

Posted on 2004-03-29
6
616 Views
Last Modified: 2008-02-01
Hi,

I'm new to dephi. I have search the net for the component but i couldn't install it.
Do you know where I could get a simple component just to change my existing radio button on the form to be transparent? I want the background colour of the text for the radio button and group box to be transparent.

I notice that if you are running windows XP style it automatically do it for you. do you know why?

Thanks
0
Comment
Question by:AgeOfWars
  • 4
  • 2
6 Comments
 
LVL 11

Expert Comment

by:shaneholmes
Comment Utility
Check out the free LMD Component set (has a TRadioGroup w/ transparent display)

http://www.ceberus.com/lmd/mfs/products/LMD70.php3

TLMDRadioGroup
Improved replacement of TRadioGroup. This component supports a full Bevel object, free positioning of caption (even vertical!) and transparent display. Customizable picture settings available.

Shane
0
 
LVL 11

Expert Comment

by:shaneholmes
Comment Utility
Oops Sorry, and....

TLMDGroupBox
Improved replacement of TGroupBox. This component supports a full Bevel object, free positioning of caption (even vertical!) and transparent display (e.g. when placed on TLMDBackPanel)    
 
 
TLMDRadioButton
Improved replacement of TRadioButton. Supports various 3D-font and layout settings. Customizable picture settings for both states. Transparent display possible.  

Shane
0
 

Author Comment

by:AgeOfWars
Comment Utility
Thanks Shane,

I know that works but I need to convert the normal group box and radio box delphi provide to transparent colour?

Do you know the code or a component to convert that?

Thanks again
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 11

Accepted Solution

by:
shaneholmes earned 50 total points
Comment Utility
Try this.

First try it with just the CreateParams overriden, then tru overridding the Paint method.

Shane


  TTransGroup = class(TGroupBox)
  protected
    procedure CreateParams(var Params: TCreateParams); override;
    procedure Paint; override;
    end;


procedure TTransGroup.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  if not (csDesigning in ComponentState)
    then Params.ExStyle:=Params.ExStyle or WS_EX_TRANSPARENT;
  end;

procedure TTransGroup.Paint;
var
  XBitMap: TBitMap;
  XOldDC: HDC;
  XRect: TRect;
begin
{This panel will be transparent only in Run Time}
  if (csDesigning in ComponentState)
    then inherited Paint
  else begin
    XRect:=ClientRect;
    XOldDC:=Canvas.Handle;
    XBitMap:=TBitMap.Create;
    try
      XBitMap.Height:=Height; XBitMap.Width:=Width;
      Canvas.Handle:=XBitMap.Canvas.Handle;
      inherited Paint;
      RedrawWindow(Parent.Handle, @XRect, 0,
                   RDW_ERASE or RDW_INVALIDATE or
                   RDW_NOCHILDREN or RDW_UPDATENOW);
    finally
      Canvas.Handle:=XOldDC;
      Canvas.BrushCopy(XRect, XBitMap, XRect, Color);
      XBitMap.Free;
      end;
    end;
  end;
0
 

Author Comment

by:AgeOfWars
Comment Utility
Thanks Shane,

I haven't tried yet but will do soon.

Regards,
Ian
0
 
LVL 11

Expert Comment

by:shaneholmes
Comment Utility
You haven't tried it yet - yet you accept it as an answer and grade me with a B! WHat'z up with that?

Shane
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now