?
Solved

Component to make existing radio group box and radio button transparent

Posted on 2004-03-29
6
Medium Priority
?
643 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10708551
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
ID: 10708563
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
ID: 10711107
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Accepted Solution

by:
shaneholmes earned 150 total points
ID: 10713063
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
ID: 10729471
Thanks Shane,

I haven't tried yet but will do soon.

Regards,
Ian
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10729491
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month12 days, 4 hours left to enroll

752 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