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. Visual Basic
  4. Window over-redrawing itself

Window over-redrawing itself

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorialquestion
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.
  • N Offline
    N Offline
    Nick_Kisialiou
    wrote on last edited by
    #1

    I developed a prototype GUI with Visual Basic .NET 2005. The problem that I am having is with window redrawing itself. I have two forms (two windows) and when one form shows the second form { .Update() and .Show() } and hides itself { .Hide() }, the second form redraws itself twice - one before .Hide() and the other one after it. I need to prevent this redrawing, because it is useless and looks ugly. Do you have any suggestions on how to do that? Thank you

    D 1 Reply Last reply
    0
    • N Nick_Kisialiou

      I developed a prototype GUI with Visual Basic .NET 2005. The problem that I am having is with window redrawing itself. I have two forms (two windows) and when one form shows the second form { .Update() and .Show() } and hides itself { .Hide() }, the second form redraws itself twice - one before .Hide() and the other one after it. I need to prevent this redrawing, because it is useless and looks ugly. Do you have any suggestions on how to do that? Thank you

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Why are you calling Update on this second form, then Show?? You're telling the form to redraw itself twice, then it might do it again after you call Hide on the first form. Don't call Update when you don't need it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      N 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Why are you calling Update on this second form, then Show?? You're telling the form to redraw itself twice, then it might do it again after you call Hide on the first form. Don't call Update when you don't need it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

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

        The thing is that this is supposed to be a "fancy interface". When a user does some manipulations and clicks a button, one window gradually disappears while the other gradually appears. The implementation based on changing Opacity property. I have just tried without update and show, and I am getting the same effect - right after the opacity reaches 100% for one and 0% for another form, the visible form starts redrawing itself completely. Looks like something tells the window to redraw itself completely with all its children. And this something seems to reside outside my code...

        D 1 Reply Last reply
        0
        • N Nick_Kisialiou

          The thing is that this is supposed to be a "fancy interface". When a user does some manipulations and clicks a button, one window gradually disappears while the other gradually appears. The implementation based on changing Opacity property. I have just tried without update and show, and I am getting the same effect - right after the opacity reaches 100% for one and 0% for another form, the visible form starts redrawing itself completely. Looks like something tells the window to redraw itself completely with all its children. And this something seems to reside outside my code...

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Now I know what you're talking about. No, there is nothing you can do about it. This is something that happens in Windows Forms. I haven't been able to find anything documenting what's causing it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          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