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. Simple progress bar code not working correctly.

Simple progress bar code not working correctly.

Scheduled Pinned Locked Moved C#
question
3 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.
  • W Offline
    W Offline
    Wheels012
    wrote on last edited by
    #1

    Good morning. I have the following code:

    uipc.tsProgBar.Style = ProgressBarStyle.Marquee;
    uipc.tsProgBar.MarqueeAnimationSpeed = 100;

    // Do some processes

    uipc.tsProgBar.Style = ProgressBarStyle.Continuous;
    uipc.tsProgBar.MarqueeAnimationSpeed = 0;

    If I put a messagebox after the uipc.tsProgBar.Style = ProgressBarStyle.Marquee; uipc.tsProgBar.MarqueeAnimationSpeed = 100; , then the progress bar with start "scrolling" and stop when the user click Ok on the messagebox. Any suggestion? Thank you, WHEELS

    D 1 Reply Last reply
    0
    • W Wheels012

      Good morning. I have the following code:

      uipc.tsProgBar.Style = ProgressBarStyle.Marquee;
      uipc.tsProgBar.MarqueeAnimationSpeed = 100;

      // Do some processes

      uipc.tsProgBar.Style = ProgressBarStyle.Continuous;
      uipc.tsProgBar.MarqueeAnimationSpeed = 0;

      If I put a messagebox after the uipc.tsProgBar.Style = ProgressBarStyle.Marquee; uipc.tsProgBar.MarqueeAnimationSpeed = 100; , then the progress bar with start "scrolling" and stop when the user click Ok on the messagebox. Any suggestion? Thank you, WHEELS

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

      If you're doing your processes on the main thread then the gui won't be able to update as you'll have hold of the thread. Look at using a BackgroundWorker so your gui remains responsive.

      W 1 Reply Last reply
      0
      • D DoctorMick

        If you're doing your processes on the main thread then the gui won't be able to update as you'll have hold of the thread. Look at using a BackgroundWorker so your gui remains responsive.

        W Offline
        W Offline
        Wheels012
        wrote on last edited by
        #3

        Thank you.

        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