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. my drawing is missing!!??[emergency]

my drawing is missing!!??[emergency]

Scheduled Pinned Locked Moved Visual Basic
csharpgraphicshelpquestion
4 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.
  • M Offline
    M Offline
    MJay
    wrote on last edited by
    #1

    i use DrawRectangle to draw shapes in vb.net form..then i minimize the form and restore again, my rectangle is missing?!!!same happen to other type of shapes!! anyone can help me plz....:((

    C M 2 Replies Last reply
    0
    • M MJay

      i use DrawRectangle to draw shapes in vb.net form..then i minimize the form and restore again, my rectangle is missing?!!!same happen to other type of shapes!! anyone can help me plz....:((

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Have you heard the story of the "Boy who cried 'wolf'"? Of your six posts on this forum 4 have carried the word "Emergency" and 1 has used the word "Urgent". Are they real emergencies? Will someone die if the answer is not found? All I am asking is that you tone down this sort of language because people will become desensitised to it. From my experience: Emergencies in software development are rare. Often if I get stuck on one part of a system I can post a question and move on to a different part. If/when someone replies I can go back and try their suggestion. To your specific problem: Are you using DrawRectangle in the Paint event handler. The reason is that when any window is minimised or another window drawn on top then the contents of the window become damaged. The Operating System will not keep track of what is being drawn on the window, that is your job. If you draw with basic tools like DrawRectangle then you have to draw each time the window gets damaged. Normally when a window is damaged and needs to be redrawn Windows will issue a Paint event. You must handle this event and perform your drawing. --Colin Mackay--

      "In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown) Enumerators in .NET: See how to customise foreach loops with C#

      M 1 Reply Last reply
      0
      • C Colin Angus Mackay

        Have you heard the story of the "Boy who cried 'wolf'"? Of your six posts on this forum 4 have carried the word "Emergency" and 1 has used the word "Urgent". Are they real emergencies? Will someone die if the answer is not found? All I am asking is that you tone down this sort of language because people will become desensitised to it. From my experience: Emergencies in software development are rare. Often if I get stuck on one part of a system I can post a question and move on to a different part. If/when someone replies I can go back and try their suggestion. To your specific problem: Are you using DrawRectangle in the Paint event handler. The reason is that when any window is minimised or another window drawn on top then the contents of the window become damaged. The Operating System will not keep track of what is being drawn on the window, that is your job. If you draw with basic tools like DrawRectangle then you have to draw each time the window gets damaged. Normally when a window is damaged and needs to be redrawn Windows will issue a Paint event. You must handle this event and perform your drawing. --Colin Mackay--

        "In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown) Enumerators in .NET: See how to customise foreach loops with C#

        M Offline
        M Offline
        MJay
        wrote on last edited by
        #3

        i put emergency becoz i am doing my final yr project... i need the information as soon as possible due the time constraint of my project... if wat i done make u unhappy... then i apologize to u... and thanks for ur reply...

        1 Reply Last reply
        0
        • M MJay

          i use DrawRectangle to draw shapes in vb.net form..then i minimize the form and restore again, my rectangle is missing?!!!same happen to other type of shapes!! anyone can help me plz....:((

          M Offline
          M Offline
          Manoj Madhavan
          wrote on last edited by
          #4

          Hi MJAY... You will need to store the points you have used to create the rectangle in an array or a file.. Then in the paint event you will have to recreate all the objects drawn in that control.. Hope this Helps.. Thanks !:) Manoj Madhavam

          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