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. UI Thread in C#

UI Thread in C#

Scheduled Pinned Locked Moved C#
csharpdesigntutorial
3 Posts 3 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.
  • U Offline
    U Offline
    User 16796
    wrote on last edited by
    #1

    Hi All, How to spawn a UI Thread in C#. I want to show window having ProgressBar while starting application(from main window constructor),application takes some time to start. The window having progressbar should run in different thread having it's own message que and all. Thanks TusharM.

    P L 2 Replies Last reply
    0
    • U User 16796

      Hi All, How to spawn a UI Thread in C#. I want to show window having ProgressBar while starting application(from main window constructor),application takes some time to start. The window having progressbar should run in different thread having it's own message que and all. Thanks TusharM.

      P Offline
      P Offline
      Paul Watson
      wrote on last edited by
      #2

      Maybe try it the other way around. You have a "splash" type screen which is your main constructor. It can load fast as it is small. It fires off a thread that starts the loading of the main app which uses delegates or some such to report back on the loading progress. Here is an article that may help you out; A Pretty Good Splash Screen in C# regards, Paul Watson South Africa The Code Project

      1 Reply Last reply
      0
      • U User 16796

        Hi All, How to spawn a UI Thread in C#. I want to show window having ProgressBar while starting application(from main window constructor),application takes some time to start. The window having progressbar should run in different thread having it's own message que and all. Thanks TusharM.

        L Offline
        L Offline
        lesnikowski
        wrote on last edited by
        #3

        You can use Application.Run more then once in an Application. Try creating new splash form, pass it to Appication.Run method then run your main form (Application.Run(new MainForm());) When you need to close the splash screen just close the splashForm (splashForm.BeginInvoke(new MethodInvoker(splashForm.Close));)

        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