Imports System.Runtime.InteropServices Public Class MyTextbox Inherits TextBox <DllImport("user32.dll")> _ Public Shared Function GetWindowDC(ByVal hWnd As IntPtr) As IntPtr End Function <DllImport("user32.dll")> _ Public Shared Function ReleaseDC(ByVal hWnd As IntPtr, ByVal hDC As IntPtr) As Integer End Function Protected Overrides Sub WndProc(ByRef m As Message) Const WM_NCPAINT As Integer = &H85 If m.Msg = WM_NCPAINT Then Dim hDC As IntPtr = GetWindowDC(m.HWnd) Dim graph As Graphics = Graphics.FromHdc(hDC) Dim pen1 As New Pen(Color.Red) Dim pen2 As New Pen(SystemColors.Window) Dim width As Integer = Bounds.Width - 1 Dim height As Integer = Bounds.Height - 1 graph.DrawRectangle(pen1, 0, 0, width, height) graph.DrawRectangle(pen2, 1, 1, width - 2, height - 2) pen1.Dispose() pen2.Dispose() graph.Dispose() ReleaseDC(m.HWnd, hDC) m.Result = IntPtr.Zero Else MyBase.WndProc(m) End If End Sub 'WndProc End Class>hi,