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. my qcm project

my qcm project

Scheduled Pinned Locked Moved C#
helpquestion
5 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.
  • N Offline
    N Offline
    naghoumeh14
    wrote on last edited by
    #1

    in the first form i have a table of labels of categories(history, geography, etc...)and a label that counts the money that i have (we start by a certain number of money) so when i click on a label a question must appear in a new form, i answer the question and i claculate the new amout of money, i close the new form and return to the initial form where the label that counts the money must be uptadeted... the problem is when i come back to the initial form the label shows the initial amout that i have initially entered without being uptated.. even though i declared a public class

    M P 2 Replies Last reply
    0
    • N naghoumeh14

      in the first form i have a table of labels of categories(history, geography, etc...)and a label that counts the money that i have (we start by a certain number of money) so when i click on a label a question must appear in a new form, i answer the question and i claculate the new amout of money, i close the new form and return to the initial form where the label that counts the money must be uptadeted... the problem is when i come back to the initial form the label shows the initial amout that i have initially entered without being uptated.. even though i declared a public class

      M Offline
      M Offline
      monstale
      wrote on last edited by
      #2

      Hi, could you send code, how you open the 2nd form? That would help bye

      N 1 Reply Last reply
      0
      • M monstale

        Hi, could you send code, how you open the 2nd form? That would help bye

        N Offline
        N Offline
        naghoumeh14
        wrote on last edited by
        #3

        in the event label_click (first form) { form2 f2=new form2(); f2.ShowDialog(); } that's all ....

        M 1 Reply Last reply
        0
        • N naghoumeh14

          in the first form i have a table of labels of categories(history, geography, etc...)and a label that counts the money that i have (we start by a certain number of money) so when i click on a label a question must appear in a new form, i answer the question and i claculate the new amout of money, i close the new form and return to the initial form where the label that counts the money must be uptadeted... the problem is when i come back to the initial form the label shows the initial amout that i have initially entered without being uptated.. even though i declared a public class

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

          You need some method to actually trigger the update of the label. If you've used databinding against the label, you can update it using INotifyPropertyChanged. Alternatively, you have to manually trigger the update yourself.

          "WPF has many lovers. It's a veritable porn star!" - Josh Smith

          As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

          My blog | My articles | MoXAML PowerToys | Onyx

          1 Reply Last reply
          0
          • N naghoumeh14

            in the event label_click (first form) { form2 f2=new form2(); f2.ShowDialog(); } that's all ....

            M Offline
            M Offline
            monstale
            wrote on last edited by
            #5

            Hi, after ShowDialog() you should update your label manually. The event will stop until your form closed, at ShowDialog() ;-) hope it helps bye

            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