How can I draw the windows form border ?

How can I draw the windows form border ?

Post by Tracey. » Wed, 16 Jul 2003 09:12:18

Hi, there. Just wonder how to make a fancy UI in VB.Net,
For example, I wish to draw a new border (curve angle
instead of rectangle one) of windows form. But I don't
know how to do it. Can someone aassist on how to achieve

Thanks in advance!


1. draw complete border around form

I have a form that I have modified the shape using the following code:

Private Declare Function CreateEllipticRgn Lib "gdi32" _
    (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, _
    ByVal Y2 As Long) As Long

Private Declare Function SetWindowRgn Lib "user32" _
    (ByVal hwnd As Long, ByVal hrgn As Long, _
    ByVal bredraw As Boolean) As Long

Private Sub Form_Load()

'Set window shape to a circle
SetWindowRgn Me.hwnd, CreateEllipticRgn(0, 0, 500, 300), True

End Sub

My question is I would like to draw a border around the complete reshaped
form. Anyone have any ideas on how to go about this. Thanks in advance.


2. crappy video-capture with IRIS

3. drawing border within form

4. help

5. How do I get the size of form borders and title bar on a form

6. Server-problems

7. Drawing a Border around a custom shaped window

8. vectors using spherical coordinate system

9. Drawing Window Borders etc...

10. Draw grid, resize with window (form)

11. How do I create an OpenGL (GLUT) window with no border (on Windows)

12. Form wintout border icon missing

13. Forms and custom borders, titlebar, toolbar etc.