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. Problem in Drawing

Problem in Drawing

Scheduled Pinned Locked Moved C#
graphicshelp
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.
  • M Offline
    M Offline
    mynameatif
    wrote on last edited by
    #1

    Hello, I am working on a project where i have to fill a recgangle on a panel against a button click.When the button is clicked it works fine the rectangle is drawn but the problem accours when i resize my form or some other form is open on it the drawing that is on the panel is wash out imen it is clered from the panel i am writing the code.If any one knows the solution plz let me know. Thanks Regards Atif public void btn_click(object sender,EventArgument e) { Graphics g=mypanel.CreatGraphic(); SolidBrush b=new SolidBursh(Color.Red); g.FillRectanle(b,0,0,40,40); }

    Y 1 Reply Last reply
    0
    • M mynameatif

      Hello, I am working on a project where i have to fill a recgangle on a panel against a button click.When the button is clicked it works fine the rectangle is drawn but the problem accours when i resize my form or some other form is open on it the drawing that is on the panel is wash out imen it is clered from the panel i am writing the code.If any one knows the solution plz let me know. Thanks Regards Atif public void btn_click(object sender,EventArgument e) { Graphics g=mypanel.CreatGraphic(); SolidBrush b=new SolidBursh(Color.Red); g.FillRectanle(b,0,0,40,40); }

      Y Offline
      Y Offline
      yoaz
      wrote on last edited by
      #2

      assuming u'r working on a window's form application you should add code to the form paint event. there are no facts, only interpretations

      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