Menu

#10 Modal Forms Problem

open
nobody
None
5
2005-05-26
2005-05-26
Anonymous
No

I can't get the Modal Form functionality to work. I have
set up the ModalFormHandler function etc. But my
modal form opens in the 'Load' method of another
(master/parent) form. The code only seems to work if
the modal form is displayed when a button is clicked on
the master/parent form.

Code snipet to show how modal form is displayed:

private void MainForm_Load(object sender,
System.EventArgs e)
{
LoginForm loginForm = new LoginForm();
loginForm.Name = "loginform";
bool close = false;

while(Thread.CurrentPrincipal.Identity.IsAuthenticated
== false && loginForm.ShowDialog(this) ==
DialogResult.OK);
.........

email: alex.woods@chase.com

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.