Jump to content

Open forms dynamically


LuizZamp

Recommended Posts

Hello,

I'm trying to find a way of opening forms by its ClassName dynamically.

I have a table with a user's allowed routines and their forms.

Actually I'm using something like this: 

procedure Openform(const DescForm: String; Parent : TWinControl);
var
  FormClass : TUniFormClass;
  AForm     : TUniForm;
begin

    FormClass := TUniFormClass(FindClass(DescForm));
    AForm := FormClass.Create.(UniApplication);
    AForm.Parent := Parent;
    AForm.Left := 0;
    AForm.Top := 0;

    AForm.Show();
end;

But using this way, I have no way of controlling whether it is assgined or not, nor do I have the UniGUI memory controls. (I would like to use the IDE's own components for this).

Is there any way that I can call those Forms like UniGUI dynamically calls his? 

I'm using uniGUI Version FMSoft_uniGUI_Complete_Professional_1.90.0.1524.

(And I'm sorry for the English, in case I didn't express myself properly).

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...