Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7826411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:24:06+00:00 2026-06-02T09:24:06+00:00

I want to plot a function in a form without the forms background being

  • 0

I want to plot a function in a form without the forms background being visible. Created a TForm with TransparentColor set to True and TransParentColorValue set to clWhite. Just put a TImage on it, draw a function on a bitmap, assign it to the image, works great. There is one problem. I cannot click the form anymore. Any click on the form’s caption and clientarea lead to a click in the underlying application. This is caused by setting TransparentColor to True. How can I prevent this “clicking-thru”?

Update
I tried Sertac’s suggestions and I got some remarkable results. I prepare the bitmap as follows:

   Bitmap.Canvas.Brush.Color := clFuchsia;
   Bitmap.Canvas.FillRect (Rect (0, 0, Bitmap.Width, Bitmap.Height));

When Color is set to clWhite and the Forms TransparentColorValue as well, the form is completely click-thru enabled.

Both set to clBlack, the form can be moved, but borders can’t be resized and system buttons don’t work

Both set to clFuchsia it behaves as a normal Form. Well, it works now but maybe someone got an explanation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T09:24:07+00:00Added an answer on June 2, 2026 at 9:24 am

    It would seem the API acts weird when some specific colors is used. White is an obvious one, black is a little less problematic. I’ve tried with yellow, gray, button face, fuchsia etc.. and they look fine.

    If anyone wants to duplicate the problem without using Delphi’s ‘Transparent…’ properties, here’s a little snippet:

    procedure TForm1.Button1Click(Sender: TObject);
    var
      Color: DWORD;
      DC: HDC;
    begin
      Color := $00FFFFFF;
      SetWindowLong(Handle, GWL_EXSTYLE,
          GetWindowLong(Handle, GWL_EXSTYLE) or WS_EX_LAYERED );
      SetLayeredWindowAttributes(Handle, Color, 255, LWA_COLORKEY);
    
      DC := GetWindowDC(Handle);
      SetDCBrushColor(DC, Color);
      FillRect(DC, Rect(10, 10, 100, 80), GetStockObject(DC_BRUSH));
      ReleaseDC(Handle, DC);
    end;
    

    Note: I’d gladly remove this answer if anyone provides an answer with a definitive explanation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data which I want to plot in cumulative function. The R
I want to visualize a mosaic plot in form of a tree. For example
I'm using qplot to plot a function and I want to position the legend
I've got a scalar function of two variables that I want to plot. Using
I want to visualize a function of the form x^n such that n=1,2,...,10. I
I want to plot a 2d rect (using the rectangle function is good enough
I want to plot stacked histograms in R; i.e. stack individual histograms in the
I want to plot email from and to in world. For example, I received
With this approach. I have a line plot graph. I want to plot 'two'
I have a vectors of strings, say c(E^A,S^P,lambda,T,E^Q,E^Q,AT) , and I want to plot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.