Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <code>TForm.AlphaBlend</code> property applies to the entire <code>TForm</code> as a whole. What you need is per-pixel alpha-blending instead, which <code>TForm</code> does not natively support. You could call <code>UpdateLayeredWindow()</code> to implement per-pixel alpha, but that may conflict with the VCL's use of <code>SetLayeredWindowAttributes()</code>.</p> <p>For a purely VCL solution, you could try using two <code>TForm</code> objects. Have one <code>TForm</code> contain just the <code>TImage</code> and no background, then have a second <code>TForm</code> lay on top of it, where the second <code>TForm</code> has both its <code>TransparentColor</code> and <code>AlphaBlend</code> properties enabled, has a square of the <code>TransparenColorValue</code> that is the same dimensions as the <code>TImage</code>, and has a dark background color that gets alpha-blended with whatever is underneath it.</p> <p>An alternative solution would be to use the Win32 API <code>CreateWindowEx()</code> function directly to create the image window, then you can use <code>UpdateLayeredWindow()</code> on it. That requires you to create an in-memory bitmap to back the window drawing, so you can draw your image directly on to that bitmap, rather than using a <code>TImage</code> component. Then you just give it a dark background and specify a per-pixel alpha for the bitmap pixels surrounding the image pixels.</p> <p>BTW, you <strong>can</strong> put a <code>TImage</code> on top of a <code>TListView</code>, if you set the <code>TListView</code> as the <code>TImage.Parent</code>. You just won't be able to alpha-blend the <code>TImage</code>, that's all.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload