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. Bring the rectangle to the front

Bring the rectangle to the front

Scheduled Pinned Locked Moved C#
graphicstutorial
2 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.
  • F Offline
    F Offline
    free_soul424
    wrote on last edited by
    #1

    Hi, I have drawn three rectangles rect1, rect2, and rect3 respectively on a windows form. These rectangles are overlapping. Most of the portion of the rect1 is covered by rect2 and rect3. I want to bring the rect1 to the front. Is there any way please guide me I will be thankful to you. Don’t ask me to draw rect1 before rect2 and rect3. Any other solution that can bring the rectangle to the front, except change the drawing sequence. Regards,

    D 1 Reply Last reply
    0
    • F free_soul424

      Hi, I have drawn three rectangles rect1, rect2, and rect3 respectively on a windows form. These rectangles are overlapping. Most of the portion of the rect1 is covered by rect2 and rect3. I want to bring the rect1 to the front. Is there any way please guide me I will be thankful to you. Don’t ask me to draw rect1 before rect2 and rect3. Any other solution that can bring the rectangle to the front, except change the drawing sequence. Regards,

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      Not that I know of. I would suggest creating a z-order list and give each rectangle a z-order property then a simple reorder using your own sort method of your list before painting the rectangles will enable you to draw them in any order required without having to hard code it.

      Dave

      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