Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. maximize a form

maximize a form

Scheduled Pinned Locked Moved C#
questionjson
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TyronX
    wrote on last edited by
    #1

    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?

    D 2 Replies Last reply
    0
    • T TyronX

      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?

      D Offline
      D Offline
      DavidNohejl
      wrote on last edited by
      #2

      Setting Form.WindowState to FormWindowState.Maximized doesn't work? ( too lazy to try right now :-O ) best regards, David 'DNH' Nohej Never forget: "Stay kul and happy" (I.A.)

      T 1 Reply Last reply
      0
      • T TyronX

        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?

        D Offline
        D Offline
        DavidNohejl
        wrote on last edited by
        #3

        Is it MDI app? David Never forget: "Stay kul and happy" (I.A.)

        T 1 Reply Last reply
        0
        • D DavidNohejl

          Setting Form.WindowState to FormWindowState.Maximized doesn't work? ( too lazy to try right now :-O ) best regards, David 'DNH' Nohej Never forget: "Stay kul and happy" (I.A.)

          T Offline
          T Offline
          TyronX
          wrote on last edited by
          #4

          No, it doesn't

          D 1 Reply Last reply
          0
          • D DavidNohejl

            Is it MDI app? David Never forget: "Stay kul and happy" (I.A.)

            T Offline
            T Offline
            TyronX
            wrote on last edited by
            #5

            What's that? I just created a new WinForm

            D 1 Reply Last reply
            0
            • T TyronX

              No, it doesn't

              D Offline
              D Offline
              DavidNohejl
              wrote on last edited by
              #6

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

              T 1 Reply Last reply
              0
              • T TyronX

                What's that? I just created a new WinForm

                D Offline
                D Offline
                DavidNohejl
                wrote on last edited by
                #7

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

                1 Reply Last reply
                0
                • D DavidNohejl

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

                  T Offline
                  T Offline
                  TyronX
                  wrote on last edited by
                  #8

                  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();

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups