Problem in Drawing
-
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); }
-
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); }