Jump to content

Display Frame in MainForm based on user logging in


Petzy

Recommended Posts

Hi,

How do I show/add/insert/embed (whatever the term is) a specific UniFrame on the MainForm based on user from database that logged in prior, using the Login form?

The Login form SQL and user choosing I've got that done.

I log in and it shows me the empty (mfpage set) main form. Now I'd like the MainForm to display the contents of a specific Frame, based on the user that logged in. (frame aligned to client of MainForm)

How can I do that? 

I keep finding examples like "Frame1.Parent.." and they don't work. 

Could anyone provide a simple example of how to implement this? I haven't found anything in the demo's

Link to comment
Share on other sites

9 minutes ago, Sherzod said:

Hi,

Please adjust your forum email address first:

 

?

Found an example meanwhile:

procedure TMainForm.UniFormShow(Sender: TObject);
var
Frame1: TFrame1;
begin
  Frame1 := TFrame1.Create(self);
  Frame1.Align := alClient;
  Frame1.Parent := MainForm;
end;

It seems to work fine
 

Link to comment
Share on other sites

  • 2 months later...

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...