c# - How to fix a rectangle to the borders of the form -


i think i'm not clear, practicing doing pictures on form. it's simple code think it's not worth post it.

i want draw semi-transparent rectangles close borders of form, have managed do. problem when re-size form rectangles stay @ original positions, , don't "follow" new position of borders.

make sure drawing in form's paint event. way, happen each time control redrawn: on resize example.

here's example: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.paint.aspx

public myform()  {     this.paint += this.paintrectangles; }  private void paintrectangles(object sender, painteventargs e) {     // use e.graphics draw stuff } 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -