T
Tal McMahon
After spending a morning wading through all the the Wrong answers and
responses I have figured out how to change the border on a textbox.
Here is the code:
Declare Function ReleaseDC Lib "user32" Alias "ReleaseDC" (ByVal
hwnd As Integer, ByVal hdc As Integer) As Integer
Protected Overrides Sub WndProc(ByRef m As Message)
MyBase.WndProc(m)
Const WM_PAINTBKG As Integer = 15
If m.Msg = WM_PAINTBKG Then
Dim g As Graphics = Me.CreateGraphics
Dim mypen As Pen = New
Pen(System.Drawing.SystemColors.GrayText, 1)
Dim width As Integer = Bounds.Width - 1
Dim height As Integer = Bounds.Height - 1
g.DrawRectangle(mypen, 0, 0, width, height)
mypen.Dispose()
g.Dispose()
End If
End Sub
I hope it saves some of you some trouble
Tal McMahon
responses I have figured out how to change the border on a textbox.
Here is the code:
Declare Function ReleaseDC Lib "user32" Alias "ReleaseDC" (ByVal
hwnd As Integer, ByVal hdc As Integer) As Integer
Protected Overrides Sub WndProc(ByRef m As Message)
MyBase.WndProc(m)
Const WM_PAINTBKG As Integer = 15
If m.Msg = WM_PAINTBKG Then
Dim g As Graphics = Me.CreateGraphics
Dim mypen As Pen = New
Pen(System.Drawing.SystemColors.GrayText, 1)
Dim width As Integer = Bounds.Width - 1
Dim height As Integer = Bounds.Height - 1
g.DrawRectangle(mypen, 0, 0, width, height)
mypen.Dispose()
g.Dispose()
End If
End Sub
I hope it saves some of you some trouble
Tal McMahon