How to make the whole form transparent and only the components are visible?

Those. stupid picture image in the middle of the screen, or label (inscription).

It is necessary to remove the frame and make the form itself transparent (without components).

    4 answers 4

    I don’t know exactly, but maybe this can be achieved with the help of borderStyle None and TransperentColor ?

      Set the properties of the form: Transparent=True , in TransparentColor specify the color that will not be used for any other controls (preferably some bright: clYellow, clFuchsia ) and set the same color in the Color property of the form. All these properties, of course, can be set programmatically, but this is necessary for those cases when the color of controls can change: labels, etc. The frame of the form is removed by the BorderStyle property with the value bsNone .

        Concerning a frame google aside WM_NCPAINT .

        Concerning creation of the form of the arbitrary sizes - CreateWindowRegion .

          I do not remember which version of Delfey, but the form has properties AlphaBlend and AlphaBlendValue just for this purpose. But there is a reservation, it works in Windows since Windows 2000. That is, on HT4, Me, 9x transparency will not be.

          • re-read the question: >> How to make the whole form transparent, and only the components are visible? Does AlphaBlend affect form only? Edit, Memo, Button, etc. remain 100% visible? - Alex Kapustin 1:59
          • Hmm .. I do not remember .. maybe I'm wrong - toxicdream
          • Then it is necessary yuzat CreateWindowRegion - toxicdream
          • The properties of AlphaBlend and AlphaBlendValue affect not only the form, but also the components - for example - if AlphaBlend = True and AlphaBlendValue = 175, then the transparency of the form and components will be slightly more than 50%. - DelphiM0ZG