How to show frame in form

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #34503
    ddlcorp44
    Participant

    How to show frame in from ? 😕

    #45525
    Paulo César
    Participant

    It's simple.

    Quote:

    var

    CurrentFrame: TFrame;

    procedure TForm1.ShowFrame;

    begin

    if (Assigned(Self)) and

    (Assigned(CurrentFrame)) then

    begin

    CurrentFrame.Visible := False;

    CurrentFrame.SetBounds( 5, 78, 774, 484 ); // Here the position and size of the frame

    CurrentFrame.Parent := Self;

    // Refresh the application

    Application.ProcessMessages;

    if SkinManager.Active then

    begin

    PrepareForAnimation(CurrentFrame);

    CurrentFrame.Visible := True;

    AnimShowControl(CurrentFrame, 200);

    end

    else

    begin

    CurrentFrame.Visible := True;

    CurrentFrame.Repaint

    end;

    end;

    end;

    using:

    procedure TForm1.Button1Click(Sender: TObject);

    begin

    if Assigned( CurrentFrame ) then

    FreeAndNil( CurrentFrame );

    CurrentFrame := TFrame_Notices.Create( Self ); // Here your frame

    ShowFrame;

    end;

    #45536
    ddlcorp44
    Participant
    'Paulo wrote:

    It's simple.

    its work :a3: .. thanks :a7:

    #45902
    Ina_Marfiani
    Participant
    'Paulo wrote:

    It's simple.

    I am still confused with the coding above 😕 , can I ask for an example project of ^_^ .. please

    thanks for advance ^_^

    #45904
    Support
    Keymaster

    Hello

    You can find a code with frames creation in the ASkinDemo.exe

    Also in this demo : http://www.alphaskins.com/sfiles/demos/framebar.zip

    #45909
    Ina_Marfiani
    Participant
    'Support' wrote:

    Hello

    You can find a code with frames creation in the ASkinDemo.exe

    Also in this demo : http://www.alphaskins.com/sfiles/demos/framebar.zip

    Hello 😉 .. sample projects that you provided, does not fit with what I expect .. I mean, how to display frames / TFrame into the form when I press the button .. can you upload example project again, thanks in advance ^_^

    #45927
    Support
    Keymaster
    'Ina_Marfiani' wrote:

    Hello 😉 .. sample projects that you provided, does not fit with what I expect .. I mean, how to display frames / TFrame into the form when I press the button .. can you upload example project again, thanks in advance ^_^

    Code:
    var
    CurrentFrame: TFrame;

    begin
    CurrentFrame := TFrame.Create(Form1);
    CurrentFrame.Parent := Form1;
    end;

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