Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
QuestionDetermine results of DockStyle.Fill (size/width) during form initialization? Pin
Anonymous17-Mar-03 9:06
Anonymous17-Mar-03 9:06 
AnswerRe: Determine results of DockStyle.Fill (size/width) during form initialization? Pin
A.Wegierski17-Mar-03 21:40
A.Wegierski17-Mar-03 21:40 
GeneralRe: Determine results of DockStyle.Fill (size/width) during form initialization? Pin
Anonymous18-Mar-03 7:21
Anonymous18-Mar-03 7:21 
GeneralUpdate a Treeview from a Listview click Pin
vlusardi17-Mar-03 8:49
vlusardi17-Mar-03 8:49 
GeneralRe: Update a Treeview from a Listview click Pin
Stephane Rodriguez.17-Mar-03 21:37
Stephane Rodriguez.17-Mar-03 21:37 
GeneralRe: Update a Treeview from a Listview click Pin
vlusardi18-Mar-03 5:31
vlusardi18-Mar-03 5:31 
GeneralMDI Question Pin
Cody C17-Mar-03 8:14
sussCody C17-Mar-03 8:14 
GeneralRe: MDI Question Pin
Don_s25-Mar-03 3:35
Don_s25-Mar-03 3:35 
You could do this in a couple of ways.

If you are in full control of the form that is poping up, you can get the required information by capturing the OnClosing event of the logon form, add the event handler in your MDI parent's load event when you open the mdi child:

//initialise the logon form
LogonForm f = new LogonForm();
//Set as child
f.MdiParent = this;
//Add event handler
f.OnClosing += new EventHandler(this.Form1_Closing);

Having done this, write code along these lines to capture properties from the closing logon form:

private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
  LogonForm f = (LogonForm)sender;
  string Uname = f.Username;
  string Pword = f.Password;
}


obviously you'll need to set up properties such as Username & Password in you logon form that are public.

An other way may be to pass up a custom Logon class from the Parent to the child by reference, you can then populate it from the logon form and the information will be available to the parent.

Let me know if you'd like me to elaborate on either of these methods.
GeneralRe: MDI Question Pin
codycaillet25-Mar-03 4:57
codycaillet25-Mar-03 4:57 
GeneralEasy Question for a Web Services Guru... really!! Pin
codeweenie17-Mar-03 7:18
codeweenie17-Mar-03 7:18 
GeneralRe: Easy Question for a Web Services Guru... really!! Pin
codeweenie18-Mar-03 3:08
codeweenie18-Mar-03 3:08 
GeneralOverriding ToString Pin
monrobot1317-Mar-03 5:39
monrobot1317-Mar-03 5:39 
GeneralRe: Overriding ToString Pin
Stephane Rodriguez.17-Mar-03 5:59
Stephane Rodriguez.17-Mar-03 5:59 
GeneralRe: Overriding ToString Pin
monrobot1317-Mar-03 7:02
monrobot1317-Mar-03 7:02 
GeneralRe: Overriding ToString Pin
se99ts17-Mar-03 21:12
se99ts17-Mar-03 21:12 
GeneralRe: Overriding ToString Pin
Stephane Rodriguez.17-Mar-03 21:29
Stephane Rodriguez.17-Mar-03 21:29 
GeneralRe: Overriding ToString Pin
se99ts17-Mar-03 21:35
se99ts17-Mar-03 21:35 
GeneralRe: Overriding ToString Pin
Stephane Rodriguez.17-Mar-03 21:46
Stephane Rodriguez.17-Mar-03 21:46 
GeneralRe: Overriding ToString Pin
leppie17-Mar-03 6:04
leppie17-Mar-03 6:04 
GeneralRe: Overriding ToString Pin
monrobot1317-Mar-03 7:03
monrobot1317-Mar-03 7:03 
GeneralRe: Overriding ToString Pin
Wolfgang Loder18-Mar-03 1:55
Wolfgang Loder18-Mar-03 1:55 
GeneralRe: Overriding ToString Pin
Don_s25-Mar-03 3:45
Don_s25-Mar-03 3:45 
GeneralWebServices and Security Pin
Braulio Dez17-Mar-03 5:13
Braulio Dez17-Mar-03 5:13 
GeneralRe: WebServices and Security Pin
Kannan Kalyanaraman17-Mar-03 17:56
Kannan Kalyanaraman17-Mar-03 17:56 
Generalform to form Pin
monrobot1317-Mar-03 4:56
monrobot1317-Mar-03 4:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.