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. Form Load

Form Load

Scheduled Pinned Locked Moved C#
questionannouncement
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.
  • G Offline
    G Offline
    gwithey
    wrote on last edited by
    #1

    Hi just wondering if there is a simple way to force the form to reload. "this.Refresh()" does not seem to work. nether does "form.Load";

    private void VMCU_BlanktheDisplay()
    {
    try
    {
    //works but doesnt update screen
    VMCU.UpdateDisplay(VMCU.BlankDisplay);

            this.Load;
            //this.Refresh();
         }
         catch (Exception)
         {
            // raise event with UCC
            VMCU.UpdateError(cmdError.BlanktheDisplay);
         }
      }
    

    Above the code i have so far. It is for a screen update, as the update works it just doesnt refresh the form. Does anyone know what i can do? Thanx George

    C 1 Reply Last reply
    0
    • G gwithey

      Hi just wondering if there is a simple way to force the form to reload. "this.Refresh()" does not seem to work. nether does "form.Load";

      private void VMCU_BlanktheDisplay()
      {
      try
      {
      //works but doesnt update screen
      VMCU.UpdateDisplay(VMCU.BlankDisplay);

              this.Load;
              //this.Refresh();
           }
           catch (Exception)
           {
              // raise event with UCC
              VMCU.UpdateError(cmdError.BlanktheDisplay);
           }
        }
      

      Above the code i have so far. It is for a screen update, as the update works it just doesnt refresh the form. Does anyone know what i can do? Thanx George

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If you want the form to repaint itself, call Invalidate(). If you want to reset your form to a known state, you need to write code to do that.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      G 1 Reply Last reply
      0
      • C Christian Graus

        If you want the form to repaint itself, call Invalidate(). If you want to reset your form to a known state, you need to write code to do that.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        G Offline
        G Offline
        gwithey
        wrote on last edited by
        #3

        Thank you for the reply, i tried this however i think it was a problem with me not updating the picture box in my program and thats why it did not appear. As i was converting an array into an image and forgot about updating the image box.

        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