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. Checking If Form Is Loaded

Checking If Form Is Loaded

Scheduled Pinned Locked Moved C#
questiongraphicsannouncement
5 Posts 4 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.
  • D Offline
    D Offline
    Daniel Negron
    wrote on last edited by
    #1

    I have an application that is using a panel to hold a bitmap, for a skin. What I wanted to do was to load the app, then launch the function on form load. It takes a few seconds to load the form, but by the time the form has finaly loaded the update process on the application is already complete. I need my users to know that an update took, place using a progress bar. What is the easiest way to check that the main form is loaded, prior to the function firing ? D

    A 1 Reply Last reply
    0
    • D Daniel Negron

      I have an application that is using a panel to hold a bitmap, for a skin. What I wanted to do was to load the app, then launch the function on form load. It takes a few seconds to load the form, but by the time the form has finaly loaded the update process on the application is already complete. I need my users to know that an update took, place using a progress bar. What is the easiest way to check that the main form is loaded, prior to the function firing ? D

      A Offline
      A Offline
      Alex Korchemniy
      wrote on last edited by
      #2

      Seems like you are trying to do a something like a splash screen. If you application starts so fast maybe you can find a better way of notifing the user that an update took place.

      D 1 Reply Last reply
      0
      • A Alex Korchemniy

        Seems like you are trying to do a something like a splash screen. If you application starts so fast maybe you can find a better way of notifing the user that an update took place.

        D Offline
        D Offline
        Daniel Negron
        wrote on last edited by
        #3

        Basically just looking to delay my function from firing right away.

        J B 2 Replies Last reply
        0
        • D Daniel Negron

          Basically just looking to delay my function from firing right away.

          J Offline
          J Offline
          Jon G
          wrote on last edited by
          #4

          A delay can be achieved with a Timer. Set your timer interval to a specified amount of time (1000 = 1 second) when your application starts, start the timer as well In your timer TICK event, stop and dispose the timer, and execute your update function. Jon G www.Gizmocoder.com

          1 Reply Last reply
          0
          • D Daniel Negron

            Basically just looking to delay my function from firing right away.

            B Offline
            B Offline
            Brian Nottingham
            wrote on last edited by
            #5

            One way would be to hook an event handler to Application.Idle in the handler you have for Form.Load. The Idle event will be raised right after the Form is actually visible to the user. Remember to unhook your handler for Application.Idle in your handler for it. You could also use BeginInvoke, which basically uses WM_POST to acheive a delayed call. So at the end of your Form.Load handler, you could do something like "BeginInvoke(new EventHandler(MyFunction));"

            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