Jump to content

switch between two MainForms


molla2005b

Recommended Posts

hi

I have 2 registered main form

  RegisterAppFormClass(TMainForm1);
  RegisterAppFormClass(TMainForm2);
 
I want to switch between theme.
 
where I can apply this code?
 
  UniMainModule.MainForm:=MainForm1;
or
  UniMainModule.MainForm:=MainForm2;
 
and is this the right way to do that?
 
tnx
Link to comment
Share on other sites

Depending on your criteria for switching between them, you can have an "empty" main form with a uniContainerPanel. You then build two separate uniFrames which you assign at run-time to the container panel based on your criteria. That will solve the visual aspect of it, the main form however will still contain the code behind, or logic but that is transparent to the user.

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