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. GUI optimization

GUI optimization

Scheduled Pinned Locked Moved C#
winformsalgorithmsperformancetutorial
4 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.
  • S Offline
    S Offline
    Scarsymmetry
    wrote on last edited by
    #1

    Hi all, i have an application with a menu, and each time i click on the menu a different userControle is loaded in the main view. Some of those user controls takes time to load and the display is quite ugly when loading. So i thought i could display a specific user control with something like "please wait loading" while the real user control is loading in background, and when its done display the real one. I searched all over google but couldn't find what i need, so i ask here if someone know how to do that Thanks

    W R N 3 Replies Last reply
    0
    • S Scarsymmetry

      Hi all, i have an application with a menu, and each time i click on the menu a different userControle is loaded in the main view. Some of those user controls takes time to load and the display is quite ugly when loading. So i thought i could display a specific user control with something like "please wait loading" while the real user control is loading in background, and when its done display the real one. I searched all over google but couldn't find what i need, so i ask here if someone know how to do that Thanks

      W Offline
      W Offline
      wheelerbarry
      wrote on last edited by
      #2

      if you wanted to just display "please wait loading", you could consider having a function that you call when beginning to load the control to display the message, and another to close it when done. i would not bother making the app multithreaded for something this simple, as it could be more hassle, unless you still want the user to interact while the control is loading. (Though this is only my opinion.)

      1 Reply Last reply
      0
      • S Scarsymmetry

        Hi all, i have an application with a menu, and each time i click on the menu a different userControle is loaded in the main view. Some of those user controls takes time to load and the display is quite ugly when loading. So i thought i could display a specific user control with something like "please wait loading" while the real user control is loading in background, and when its done display the real one. I searched all over google but couldn't find what i need, so i ask here if someone know how to do that Thanks

        R Offline
        R Offline
        Rob Graham
        wrote on last edited by
        #3

        Why not preload all of the controls at startup (using s splash screen while this happens), then just enable and bring to front (change the z-order) the one you want to activate (disable the one being replaced). Changing the z-order will be much faster, and you get the loading out of the way at startup.

        1 Reply Last reply
        0
        • S Scarsymmetry

          Hi all, i have an application with a menu, and each time i click on the menu a different userControle is loaded in the main view. Some of those user controls takes time to load and the display is quite ugly when loading. So i thought i could display a specific user control with something like "please wait loading" while the real user control is loading in background, and when its done display the real one. I searched all over google but couldn't find what i need, so i ask here if someone know how to do that Thanks

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          What is your application, Web or Windows? Use something like UserControl.visible = false; Label.visible = true; The reverse when user control is ready


          only two letters away from being an asset

          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