我从中派生了一个组件,System.Windows.Forms.ScrollableControl
但添加边框属性时遇到问题。我试过CreateParams
但没有成功,也许我错过了什么?
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