Guest Posted February 21, 2011 Posted February 21, 2011 Message from: "Trebor" Hi Farshad, I want to implement unigui windowsless form (without borders), but the windowless demo states that only borders from the main form can be removed. How can I implement login page with borders (this page will be shown for authentication purposes only at the begining) , and main form without borders ? Is it possible to change the main form in runtime ? Thanks, Trebor . Quote
Guest Posted February 21, 2011 Author Posted February 21, 2011 Message from: "zilav" > How can I implement login page with borders (this page will be shown for > authentication purposes only at the begining) , > and main form without borders ? 1. Hide all controls on MainForm, or even better use frames like in UniGUI MegaDemo - a main frame and login frame. 2. Put UniTimer on Mainform, set RunOnce to true and delay to 100ms. 3. In OnTimer event show your login form/switch to login frame 4. In login form/frame on OK button click event do required password checks, and show controls in MainForm and close login form, or switch to main frame. . Quote
Guest Posted February 21, 2011 Author Posted February 21, 2011 Message from: "Farshad Mohajeri" "Trebor" wrote in message news:Ial8uNa0LHA.2160@anaxagvs227... > Hi Farshad, > > I want to implement unigui windowsless form (without borders), but the > windowless demo states that only borders from the main form can be > removed. > > How can I implement login page with borders (this page will be shown for > authentication purposes only at the begining) , > and main form without borders ? > > Is it possible to change the main form in runtime ? Currently no, you can't. MainForm is where your web session starts. Your session ends after closing MainForm. You can simply call your login form in mainForm's OnShow event: procedure TMainForm.UniFormShow(Sender: TObject); begin LoginForm.ShowModal; end; . Quote
Guest Posted February 21, 2011 Author Posted February 21, 2011 Message from: "Farshad Mohajeri" "zilav" wrote in message news:pd9XsDc0LHA.2160@anaxagvs227... >> How can I implement login page with borders (this page will be shown >> for authentication purposes only at the begining) , >> and main form without borders ? > > 2. Put UniTimer on Mainform, set RunOnce to true and delay to 100ms. > 3. In OnTimer event show your login form/switch to login frame Or you can call LoginForm.ShowModal directly in MainForm's OnShow Event . Quote
Guest Posted February 21, 2011 Author Posted February 21, 2011 Message from: "Junior/RO" zilav escreveu: > 1. Hide all controls on MainForm, or even better use frames like in UniGUI MegaDemo - a main frame and login frame. I do this too. I think that is a good practice. . Quote
Guest Posted February 21, 2011 Author Posted February 21, 2011 Message from: "Trebor" > You can simply call your login form in mainForm's OnShow event: > > procedure TMainForm.UniFormShow(Sender: TObject); > begin > LoginForm.ShowModal; > end; > > Solved. Thank you all. . Quote
alivardar Posted April 3, 2012 Posted April 3, 2012 Hi, When animate parameter is True Login Window loosing showmodal. Be careful because Main window automatically focusing. I guess it is a bug. Best Regards M.Ali VARDAR Message from: "Trebor" > You can simply call your login form in mainForm's OnShow event: > > procedure TMainForm.UniFormShow(Sender: TObject); > begin > LoginForm.ShowModal; > end; > > Solved. Thank you all. . Quote
Administrators Farshad Mohajeri Posted April 3, 2012 Administrators Posted April 3, 2012 Hi, When animate parameter is True Login Window loosing showmodal. Be careful because Main window automatically focusing. I guess it is a bug. Yes, it is a problem. Actually, we must remove Animate parameter in future. It confers with the way Modal forms work in uniGUI. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.