I derived a component from System.Windows.Forms.ScrollableControl and I have problems to add border property. I tried with CreateParams but without success, maybe I miss something?
Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
Get
Dim params As CreateParams = MyBase.CreateParams
params.Style = params.Style Or &H800000 ' Turn on WS_BORDER
Return params
End Get
End Property
'disable scroll bars, this part also disables my border
Protected Overrides Sub DefWndProc(ByRef m As Message)
If m.Msg <> 131 Then
MyBase.DefWndProc(m)
End If
End Sub
Looks like you want to have a border property of true/false:
Bob Powell has an article regarding that: Adding a standard border to a control