
Originally Posted by
VBDT
I am surprised how many people post questions that have the answers in the CodeBank of this forum. Check the link in my signature (Rounded-corner rectangles and controls). The code is written for you already

I hope it helps.
Thank you very much for all your replies.
fourblades, the link you posted was exactly what i did. This causes the corners to not be transparent when i change opacity during runtime.
VBDT, I tried pasting the code
Code:
'End moving code
'Draw a rounded rectangle in the forms paint event.
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
e.Graphics.DrawPath(Pens.Red, Shape.RoundedRectangle(New Rectangle(5, 5, 100, 100), 8))
End Sub
'Show the control on the form with rounded corners.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Panel1.Region = Shape.RoundedRegion(Panel1.Size, 10)
End Sub
but i get shape and panel 11 as undeclared. How can I fix this?