Transparent form

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #46168
    gispos
    Participant

      Hi,

      there is not a AlphaControls technics but a AlphaBlend technic under Delphi.

      MyForm.AlphaBlend := True;

      MyForm.AlphaBlendValue := 180;

      My Opinion: You should first learn Delphi before do use AlphaControls. <_<

      regards

      gispos

      #46169
      Marcos R.
      Participant

        Ok,

        but before I saw your answer I resolved with this same code.

        Even so, thank you by your help and by your education.

        Marcos

        #46200
        gispos
        Participant

          It was not meant any harm, but it is better to concentrate on the essentials in the beginning.

          Here is a simple example do show a Form with fade in effect. With the fade function of alpha controls I have in older versions problems with flicker is AlphaBlendValue smaller then 255.

          Code:
          procedure AlternativeFadeIn(aForm: TForm; max: Integer);
          var
          i: Integer;
          begin
          sSkinManager1.AnimEffects.FormShow.Time := 0;
          If max > 255 then
          max := 255;

          aForm.AlphaBlendValue := 1;
          aForm.AlphaBlend := true;
          aForm.Visible := true;
          SetWindowPos(aForm.Handle, HWND_TOP,0,0,0,0, SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE);
          UpdateWindow(aForm.Handle);
          //RedrawWindow(aForm.Handle, nil, 0, RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME or RDW_ERASE or RDW_UPDATENOW);

          aForm.Update; // AlphaControls needs this

          for i := 1 to 50 do
          if max > aForm.AlphaBlendValue – 5 then
          begin
          aForm.AlphaBlendValue := round(i*5.1);
          sleep(4);
          end
          else break;

          aForm.AlphaBlendValue := max;
          //RedrawWindow(aForm.Handle, nil, 0, RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_FRAME or RDW_ERASE or RDW_UPDATENOW);
          end;

          Best regards

          gispos

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.