i set my forms FormBorderStyle to None in vb.net
i want to assign a border line in different colour which is not inside the form.

how can i do it

Recommended Answers

All 2 Replies

which border? and where is it if it's not inside the form?!!

Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    End Sub

    Protected Overrides Sub OnPaint(ByVal pe As System.Windows.Forms.PaintEventArgs)
 Dim pn As New Pen(Color.Green)
        pn.Width = 5
        pe.Graphics.DrawRectangle(pn, 0, 0, Me.Width - pn.Width, Me.Height - pn.Width)
        pn = Nothing
    End Sub

End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.