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

winform

Scheduled Pinned Locked Moved C#
databasequestion
2 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.
  • F Offline
    F Offline
    fmardani
    wrote on last edited by
    #1

    Hi, The menu item freezes for a few seconds each time it is clicked on. It basically brings up another form i.e. form2. In form2 (load event) data is retrieved from a database. The menu in form1 freezes for a few seconds until form2 is displayed. Is it possible to avoid the menu to freeze? Thanks

    P 1 Reply Last reply
    0
    • F fmardani

      Hi, The menu item freezes for a few seconds each time it is clicked on. It basically brings up another form i.e. form2. In form2 (load event) data is retrieved from a database. The menu in form1 freezes for a few seconds until form2 is displayed. Is it possible to avoid the menu to freeze? Thanks

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      The time is being taken up by the database retrieval. One way to get around this problem is to make the database retrieval run on a different thread to the load and then display the data in the main UI when it has finished. Have a look at BackgroundWorker to get an idea as to how this could work.

      the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
      Deja View - the feeling that you've seen this post before.

      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