maximize a form
-
I've tried for about all possible functions, searched thru articels, messageboards and the rest of the internet but nothing works. When my Program starts up, i create a second window (titled Reminder) but hide it immediately. Various timers cause this Reminderwindow to pop up. But if my main window is minimized to taskbar the reminderwindow will also be minimized and visible in the taskbar. So... how do i avoid this so that the remidnerwindow pops up again?
-
I've tried for about all possible functions, searched thru articels, messageboards and the rest of the internet but nothing works. When my Program starts up, i create a second window (titled Reminder) but hide it immediately. Various timers cause this Reminderwindow to pop up. But if my main window is minimized to taskbar the reminderwindow will also be minimized and visible in the taskbar. So... how do i avoid this so that the remidnerwindow pops up again?
Setting
Form.WindowState
toFormWindowState.Maximized
doesn't work? ( too lazy to try right now :-O ) best regards, David 'DNH' Nohej Never forget: "Stay kul and happy" (I.A.) -
I've tried for about all possible functions, searched thru articels, messageboards and the rest of the internet but nothing works. When my Program starts up, i create a second window (titled Reminder) but hide it immediately. Various timers cause this Reminderwindow to pop up. But if my main window is minimized to taskbar the reminderwindow will also be minimized and visible in the taskbar. So... how do i avoid this so that the remidnerwindow pops up again?
Is it MDI app? David Never forget: "Stay kul and happy" (I.A.)
-
Setting
Form.WindowState
toFormWindowState.Maximized
doesn't work? ( too lazy to try right now :-O ) best regards, David 'DNH' Nohej Never forget: "Stay kul and happy" (I.A.) -
Is it MDI app? David Never forget: "Stay kul and happy" (I.A.)
-
oh, I see. Strange behaviour! anyway, I was playing with it... I don't whow what exactly are you doing, bt I made this work:
private void timer1_Tick(object sender, System.EventArgs e) { if(m_popUpForm.IsDisposed) { m_popUpForm = new Form(); } m_popUpForm.WindowState=FormWindowState.Maximized; m_popUpForm.Show(); }
where m_popUpForm is protected member and it's basic Form class. It pops up maximized nicely every tick event... even when "parent" form is minimalized! Is it behavour tou want? I can send you whole app if you want. I have to admit it's not the best way how to debug :-O bt it works and time is valuable, so forgive me so unprofessional approach :) David Never forget: "Stay kul and happy" (I.A.) -
MDI stands for Multiple Document Interface. It's old school way how to organise UI... if interested, check out IsMDIContainer property of Form in MSDN :) David Never forget: "Stay kul and happy" (I.A.)
-
oh, I see. Strange behaviour! anyway, I was playing with it... I don't whow what exactly are you doing, bt I made this work:
private void timer1_Tick(object sender, System.EventArgs e) { if(m_popUpForm.IsDisposed) { m_popUpForm = new Form(); } m_popUpForm.WindowState=FormWindowState.Maximized; m_popUpForm.Show(); }
where m_popUpForm is protected member and it's basic Form class. It pops up maximized nicely every tick event... even when "parent" form is minimalized! Is it behavour tou want? I can send you whole app if you want. I have to admit it's not the best way how to debug :-O bt it works and time is valuable, so forgive me so unprofessional approach :) David Never forget: "Stay kul and happy" (I.A.)ah. Now i found the Problem. I had the set the WindowState, Show the Form and Activate it. [Form.WindowState=FormWindowState.Normal; Form.Show(); Form.Activate();] The Problem occurs when you generate a hidden Winform on startup Subform blah = new Subform(); blah.Hide(); and then try to show it when the main Form is minimized private void button1_Click(object sender, System.EventArgs e) { this.WindowState = FormWindowState.Minimized; blah.WindowState = FormWindowState.Normal; blah.Show(); blah.Activate(); } It won't show up without bla.Activate();