XP look an feel [Resolved]
Two part question:
1. Is there an easy way in vb.net 2002 to make the rounded corners "XP Style" on a panel
without going thru all the trouble of using 3rd party add on's?
2. This code lets you move "slide" a panel but it will let you pull it all the way off the
forms edge or all the way back into itself and either case it disapears.
It needs to have a way to set a limit like a form has MaximumSize and MinimumSize
type limits. Any thoughts on an easy way to get this to work?
Maybe like if the panel is moved to a certian point that it stops
moving or something.
Code:
Dim _mouseDown As Boolean = False
Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If _mouseDown = True Then
Panel1.Width = e.X
Else
If e.X >= Panel1.Width - 3 Then
Panel1.Cursor = Cursors.VSplit
Else
Panel1.Cursor = Me.Cursor
End If
End If
End Sub
Private Sub Panel1_MouseDown(ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
_mouseDown = True
Panel1.Cursor = Cursors.VSplit
End Sub
Private Sub Panel1_MouseUp(ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseUp
_mouseDown = False
Panel1.Cursor = Me.Cursor
End Sub