ok, you can use me.width and me.height as I mentioned if the form has no borders. But when you add borders it changes the height and width so it would be better to use me.clientsize.width and me.clientsize.height. This is my fault but all the same let me give you an example of how to use it.
clientsize is the size of the form inside of it's borders if it has any; if not it's the size of the form. Also, notice I convert points to Integer. When calculating points remember to do this, you never know where the point may end up with division and all.
me.clientsize.width is the length of the client area from left to right, Left being 0 and right being (y amount) however far the form is stretched.
height is the same except im sure you know it's up and down. 0 being top and x amount being bottom.
[SIZE=2][COLOR=#0000ff]Protected [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Overrides [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] OnPaintBackground([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2]System.Windows.Forms.PaintEventArgs)
[/SIZE][SIZE=2][COLOR=#0000ff] MyBase[/COLOR][/SIZE][SIZE=2].OnPaintBackground(e)[/SIZE]
[SIZE=2]'here i declare points for you to easily see what I am doing. There are more efficient ways like putting points into arrays and what not. This is just an aid to learn with.
[/SIZE][SIZE=2][COLOR=#0000ff] Dim[/COLOR][/SIZE][SIZE=2] top [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Point([/SIZE][SIZE=2][COLOR=#0000ff]CInt[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ClientSize.Width / 2), 0)
[/SIZE][SIZE=2][COLOR=#0000ff] Dim[/COLOR][/SIZE][SIZE=2] left [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Point(0, [/SIZE][SIZE=2][COLOR=#0000ff]CInt[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ClientSize.Height / 2))
[/SIZE][SIZE=2][COLOR=#0000ff] Dim[/COLOR][/SIZE][SIZE=2] bottom [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Point([/SIZE][SIZE=2][COLOR=#0000ff]CInt[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ClientSize.Width / 2),[/SIZE][SIZE=2][COLOR=#0000ff] Me[/COLOR][/SIZE][SIZE=2].ClientSize.Height)
[/SIZE][SIZE=2][COLOR=#0000ff] Dim[/COLOR][/SIZE][SIZE=2] right [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Point([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ClientSize.Width, [/SIZE][SIZE=2][COLOR=#0000ff]CInt[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ClientSize.Height / 2))
e.Graphics.DrawLine(Pens.Black, top, left)
e.Graphics.DrawLine(Pens.Black, left, bottom)
e.Graphics.DrawLine(Pens.Black, bottom, right)
e.Graphics.DrawLine(Pens.Black, right, top)
[/SIZE][SIZE=2][COLOR=#0000ff]End [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub
[/COLOR][/SIZE]
Also for some reason the form dosn't repaint autmatically like it should always, so when ever you want to invoke or cause the OnPaint method to run in code just call me.invalidate or me.refresh.
Cut and paste that code into a sample form and run it to see it at work. Any more questions please feel free to ask. I tried to keep it really simple but I'm here if you need more details.
Also, this isn't a triangle, this is a diamond shape to the form. I didn't have time to draw your star shape but I suggest once you get it to use an array of points and the e.graphics.drawline
s (pen, array of points here) to draw the star or triangles. Goodluck
I also have another post listed if you review my threads that shows some graphic renedering in realtime. It uses multithreading and what knot but may be interesting to you.