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. enabling pictures during processing

enabling pictures during processing

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

    hi, i have a connection dialog and put some labels in there. there's a picturebox in front of each label with an icon signaling that the operation described in the corresponding label has been finished. should look something like:

    * connecting
    * receiving
    * saving
    copying
    calculating
    etc etc

    this should tell the user, that the first three activities were finished and the fourth is in progress (it's all a little niftier, but you get the point). now the problem: i have the function, that does all the operations in sequence and activates the pictures appropriately. but they don't show. only after all operations have been finished, all symbols are shown. i've set the pictures (which are of type System.Windows.Forms.PictureBox) to visible=false in the dialog-editor and just turn them on with visible=true during processing. when i enable/disable the corresponding labels, they DO change their state on the fly :wtf: - so there IS some dialog-drawing function active in the background - why doesn't it draw the pictures, when it is able to redraw the labels? :| moreover: i've put the operation-function in a different thread and signaled the eventchange via event/delegate to the dialog but it just doesn't help. any suggestions? thank you boys (and girls?) i rely on you ;) :rose: Edit: if someone wants to check out a minimum-demo-project about my problem he can download and try this

    R L 2 Replies Last reply
    0
    • R Rupel

      hi, i have a connection dialog and put some labels in there. there's a picturebox in front of each label with an icon signaling that the operation described in the corresponding label has been finished. should look something like:

      * connecting
      * receiving
      * saving
      copying
      calculating
      etc etc

      this should tell the user, that the first three activities were finished and the fourth is in progress (it's all a little niftier, but you get the point). now the problem: i have the function, that does all the operations in sequence and activates the pictures appropriately. but they don't show. only after all operations have been finished, all symbols are shown. i've set the pictures (which are of type System.Windows.Forms.PictureBox) to visible=false in the dialog-editor and just turn them on with visible=true during processing. when i enable/disable the corresponding labels, they DO change their state on the fly :wtf: - so there IS some dialog-drawing function active in the background - why doesn't it draw the pictures, when it is able to redraw the labels? :| moreover: i've put the operation-function in a different thread and signaled the eventchange via event/delegate to the dialog but it just doesn't help. any suggestions? thank you boys (and girls?) i rely on you ;) :rose: Edit: if someone wants to check out a minimum-demo-project about my problem he can download and try this

      R Offline
      R Offline
      Rupel
      wrote on last edited by
      #2

      hmm X| simply calling the forms Update() function solves the problem. :laugh: but why is the Label.Enabled-setter calling it itself and the PictureBox.Visible-setter doesn't? :confused: anyways. thx everyone for reading... ;) :wq

      1 Reply Last reply
      0
      • R Rupel

        hi, i have a connection dialog and put some labels in there. there's a picturebox in front of each label with an icon signaling that the operation described in the corresponding label has been finished. should look something like:

        * connecting
        * receiving
        * saving
        copying
        calculating
        etc etc

        this should tell the user, that the first three activities were finished and the fourth is in progress (it's all a little niftier, but you get the point). now the problem: i have the function, that does all the operations in sequence and activates the pictures appropriately. but they don't show. only after all operations have been finished, all symbols are shown. i've set the pictures (which are of type System.Windows.Forms.PictureBox) to visible=false in the dialog-editor and just turn them on with visible=true during processing. when i enable/disable the corresponding labels, they DO change their state on the fly :wtf: - so there IS some dialog-drawing function active in the background - why doesn't it draw the pictures, when it is able to redraw the labels? :| moreover: i've put the operation-function in a different thread and signaled the eventchange via event/delegate to the dialog but it just doesn't help. any suggestions? thank you boys (and girls?) i rely on you ;) :rose: Edit: if someone wants to check out a minimum-demo-project about my problem he can download and try this

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

        Hi there Changing the pictures should not be a problem if you have events firing for your "functions". So if there are no events defined for them yet, just create an event for each "function". I did this a while back to show diferent pictures for "Offline, Connecting, Online". Pretty easy stuff once you grasp events. Hope this helps :) READ MSDN

        R 1 Reply Last reply
        0
        • L leppie

          Hi there Changing the pictures should not be a problem if you have events firing for your "functions". So if there are no events defined for them yet, just create an event for each "function". I did this a while back to show diferent pictures for "Offline, Connecting, Online". Pretty easy stuff once you grasp events. Hope this helps :) READ MSDN

          R Offline
          R Offline
          Rupel
          wrote on last edited by
          #4

          ok. thx. would be another idea to split the long sequence into seperate functions. but i have to use a lot of variables in all of the parts of this long sequence - so splitting it up would result in a lot of !=null testing of class-members which only have the task to pass data from one private function to another ... :suss: hmm. too much overhead in the code i think... but thx anyway for the idea :) :wq

          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