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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bechir BejaouiPosted Feb 28, 2009, 5:38 PM
AddHandler Form1.ActiveForm.Paint, AddressOf Form1_Paint
End Sub
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As PaintEventArgs)
Dim graphic As Graphics = e.Graphics
Dim Layout As New Rectangle(New Point(0, 0), Form1.ActiveForm.Size)
graphic.DrawRectangle(New Pen(Color.Red, 2F), Layout)
End Sub
Bechir BejaouiPosted Mar 2, 2009, 4:10 PM
srikanth sambariPosted Mar 2, 2009, 12:35 AM
srikanth sambariPosted Mar 2, 2009, 12:19 AM
AddHandler Form1.ActiveForm.Paint, AddressOf Form1_Paint
the exception is
Object reference not set to an instance of an object.
plz help me