Recent

Author Topic: How to make something transparent  (Read 1004 times)

tearsfornations

  • New Member
  • *
  • Posts: 35
  • Jesus is worth talking about.
    • Lightning Bolt Quiz - How many Lightning Bolts do you deserve?
How to make something transparent
« on: April 20, 2023, 08:48:33 pm »
Is it possible to have a certain color transparent on my form, so like magenta color when compiled and ran is not apart of the form, so for example, I can have my form completely transparent except for a label or something which is blue?

An application does this it is a clock and the clock hours/minutes are visible and moveable but there is nothing else visible.
-
Used C++Builder for the longest time, got macOS, How many Lightning Bolts do you deserve? Find out at my website: https://boltquiz.org

tearsfornations

  • New Member
  • *
  • Posts: 35
  • Jesus is worth talking about.
    • Lightning Bolt Quiz - How many Lightning Bolts do you deserve?
Re: How to make something transparent
« Reply #1 on: April 20, 2023, 08:49:04 pm »
and when I mean transparent, I mean like you can't even click on the form where that color exists.
Thanks
-
Used C++Builder for the longest time, got macOS, How many Lightning Bolts do you deserve? Find out at my website: https://boltquiz.org

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: How to make something transparent
« Reply #2 on: April 20, 2023, 09:52:50 pm »
Yeno.... (Yes/No)

The way of how you describe it = No.
You can have your own styled Form (needs some work to accomplish) where the Form is looking like a star (🌟) for example by re-modify the Forms boundaries.
You could also having an Image displayed as your Form in whatever way you want to have it displayed.

But actually the first thing that come into my Head while reading your Text about a time display and dragging thing would be:
- borderless full transparent window
- transparent image client aligned
- in one of the corners a small panel (or again a picture...)
- the small panel is by default not visible
- make for your mainform (the transparent image) mouse- -enter and -leave events that take care about the small panel display on/off
- make the small image as your dragging control
- paint on main image the time and let background transparent (click-thru = I only know how-to for windows operating system)

Does that makes any sense to you?
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

tearsfornations

  • New Member
  • *
  • Posts: 35
  • Jesus is worth talking about.
    • Lightning Bolt Quiz - How many Lightning Bolts do you deserve?
Re: How to make something transparent
« Reply #3 on: April 20, 2023, 11:35:07 pm »
It's a lot to take in, sounds like a lot of work.
I can review later on.
Thanks
-
Used C++Builder for the longest time, got macOS, How many Lightning Bolts do you deserve? Find out at my website: https://boltquiz.org

wp

  • Hero Member
  • *****
  • Posts: 13503
Re: How to make something transparent
« Reply #4 on: April 20, 2023, 11:41:49 pm »
https://lazplanet.blogspot.com/2014/04/shape-your-form-into-anything.html

This is applied in the attached project which uses a colored version of the Lazarus paw to shape the form. You can move the form by clicking and dragging any point of the claw, but there will be no response after clicking on any transparent part.
« Last Edit: April 21, 2023, 12:07:03 am by wp »

 

TinyPortal © 2005-2018