Lazarus

Programming => LCL => Topic started by: loaded on January 11, 2022, 09:44:54 am

Title: [Solved] How can only a visual form be prepared.
Post by: loaded on January 11, 2022, 09:44:54 am
Hi All,
Is there a way to get to the controls behind a transparent form with the Alphablendvalue set to 100 and the form style set to fsSystemStayOnTop?
My goal is to keep the form in one corner of the screen as a transparent image.
Title: Re: How can only a visual form be prepared.
Post by: balazsszekely on January 11, 2022, 02:55:27 pm
Hi All,
Is there a way to get to the controls behind a transparent form with the Alphablendvalue set to 100 and the form style set to fsSystemStayOnTop?
My goal is to keep the form in one corner of the screen as a transparent image.

You mean you wish to click items on the desktop? Just below your application.
Title: Re: How can only a visual form be prepared.
Post by: loaded on January 11, 2022, 02:59:52 pm
GetMem Master,
Yes, this is exactly what I want.
Title: Re: How can only a visual form be prepared.
Post by: balazsszekely on January 11, 2022, 03:07:26 pm
@loaded

Please try attached project. There is a small rectangular area in the bottom right, so you can move your form around, alternatively resize it if needed.

PS: You can also close it via right click. The project is windows only.
Title: Re: How can only a visual form be prepared.
Post by: loaded on January 11, 2022, 05:26:42 pm
Master GetMem,
Project does not open and forms do not load in Lazarus.
But if I create a new project and add your forms it works, but this time there is no transparency view.
Title: Re: How can only a visual form be prepared.
Post by: balazsszekely on January 11, 2022, 05:37:07 pm
Master GetMem,
Project does not open and forms do not load in Lazarus.
But if I create a new project and add your forms it works, but this time there is no transparency view.

Sorry I work with Lazarus Trunk. Should be fixed now.
Title: Re: How can only a visual form be prepared.
Post by: loaded on January 11, 2022, 05:48:23 pm
Master, Your project worked this time very well, as I wanted. Thank you so much.

Sorry I work with Lazarus Trunk. Should be fixed now.
Master, you don't have to worry, every line you write is a blessing to me whether it works or not.

I want to ask something for the last time. If I put an image object in this form and upload an image, is it possible to show it transparently?
Title: Re: How can only a visual form be prepared.
Post by: balazsszekely on January 11, 2022, 05:53:09 pm
@loaded
Quote
I want to ask something for the last time. If I put an image object in this form and upload an image, is it possible to show it transparently?
No because the above example works with region, basically the middle of the form is cut out. You can create a second transparent form and place it in the middle of the main form. When the main form moves, you should move the second form two. Give me a few minutes to try it.
Title: Re: How can only a visual form be prepared.
Post by: loaded on January 11, 2022, 06:01:13 pm
Give me a few minutes to try it.
I will gladly wait.  :)
Title: Re: How can only a visual form be prepared.
Post by: balazsszekely on January 11, 2022, 07:04:07 pm
@loaded
Something like this?
Title: Re: How can only a visual form be prepared.
Post by: loaded on January 11, 2022, 07:21:47 pm
Master, yes in appearance this is exactly what I want.
But this time, I can't access the bottom control like in the first example.
I know I want a lot but;
I would appreciate it if you could help me one last time if the accessibility of the controls at the bottom is possible.
Title: Re: How can only a visual form be prepared.
Post by: balazsszekely on January 11, 2022, 07:30:56 pm
@loaded
Quote
But this time, I can't access the bottom control like in the first example.
I removed the possibility to resize the window, because the image size is fixed. If yo want to re-enable it jus,t replace WndCallback method from the previous example(unit1.pas)
Title: Re: How can only a visual form be prepared.
Post by: loaded on January 11, 2022, 07:38:06 pm
Master GetMem,  Thank you very much for your hard work.
Looks like I'll have to do some trial and error.
Title: Re: How can only a visual form be prepared.
Post by: balazsszekely on January 12, 2022, 06:04:22 am
@loaded
Quote
I would appreciate it if you could help me one last time if the accessibility of the controls at the bottom is possible.
Oh now I see! You cannot click through the form. Fixed in the attached project.
Title: Re: How can only a visual form be prepared.
Post by: loaded on January 12, 2022, 09:09:05 am
Master GetMem,
Yes, that's exactly what I wanted. The problem is solved. I thank you very much, but I cannot thank you enough.
I'd like to buy you coffee, I guess that's not possible right now! But I will plant for you from the oak sapling below and it will have a lifespan of about 1000 years. When he grows up and becomes a tree, he will remember his name as many as his leaves throughout his life.
TinyPortal © 2005-2018