Where can i find this spliter control... i find it more professional looking then the one that ships with .net 2.0...
thx in advance...
Printable View
Where can i find this spliter control... i find it more professional looking then the one that ships with .net 2.0...
thx in advance...
well...i find an example of how to do this control in c#, in http://www.windowsforms.net/Default....dex=4&tabid=49 (Outlook 2003 Look and Feel ) ...but i cant convert it to vb.net... any help ?
thx in advance...
There are links to code converters in my signature. Most C# code is quite easily converted to VB.NET anyway. If you just look at it line by line most code is almost exactly the same. If you know a few of the syntax rules that's all you need. Most of those you can figure out for yourself too.
done... used your sig links and converted...had to make some adjustments... looking good now :thumb:
That looks really good zuperman! Very pretty Gui, and not over the top!
thx... :thumb: im doing my best...regards...Quote:
Originally Posted by |2eM!x
DevComponent's DotNetBar has an excellent splitter control for VB/C# 2003/2005. Including awesome Office 2007 controls.
$189 for a set of slow components...no thanks...Quote:
Originally Posted by tylerm
sharing the code :)
VB Code:
Imports System.Drawing Imports System.Drawing.Drawing2D Imports System.Windows.Forms Public Class mySplitContainer Dim objColorTable As New ProfessionalColorTable Dim mcolGradientStart As Color = objColorTable.OverflowButtonGradientMiddle Dim mcolGradientEnd As Color = objColorTable.OverflowButtonGradientEnd Property SplitterColorStart() As Color Get SplitterColorStart = mcolGradientStart End Get Set(ByVal Value As Color) mcolGradientStart = Value End Set End Property Property SplitterColorEnd() As Color Get SplitterColorEnd = mcolGradientEnd End Get Set(ByVal Value As Color) mcolGradientEnd = Value End Set End Property Private Sub mySplitContainer_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim bounds As Rectangle = sender.SplitterRectangle Dim squares As Integer Dim maxSquares As Integer = 9 Dim squareSize As Integer = 4 Dim boxSize As Integer = 2 Dim enuOrientation As Orientation = sender.orientation Dim g As Graphics = e.Graphics Dim Colorbegin As Color = mcolGradientStart Dim Colorend As Color = mcolGradientEnd If (bounds.Width > 0) AndAlso (bounds.Height > 0) Then If enuOrientation = Windows.Forms.Orientation.Vertical Then Dim b As Brush = New LinearGradientBrush(bounds, Colorbegin, Colorend, LinearGradientMode.Horizontal) Try g.FillRectangle(b, bounds) Finally CType(b, IDisposable).Dispose() End Try If (bounds.Height > squareSize) AndAlso (bounds.Width > squareSize) Then squares = Math.Min((bounds.Height / squareSize), maxSquares) Dim start As Integer = (bounds.Height - (squares * squareSize)) / 2 Dim X As Integer = bounds.X + 1 Dim dark As Brush = New SolidBrush(objColorTable.GripDark) Dim middle As Brush = New SolidBrush(objColorTable.ToolStripBorder) Dim light As Brush = New SolidBrush(objColorTable.ToolStripDropDownBackground) Dim idx As Integer = 0 While idx < squares g.FillRectangle(dark, X, start, boxSize, boxSize) g.FillRectangle(light, X + 1, start + 1, boxSize, boxSize) g.FillRectangle(middle, X + 1, start + 1, 1, 1) start += squareSize System.Math.Min(System.Threading.Interlocked.Increment(idx), idx - 1) End While dark.Dispose() middle.Dispose() light.Dispose() End If Else Dim b As Brush = New LinearGradientBrush(bounds, Colorbegin, Colorend, LinearGradientMode.Vertical) Try g.FillRectangle(b, bounds) Finally CType(b, IDisposable).Dispose() End Try If (bounds.Width > squareSize) AndAlso (bounds.Height > squareSize) Then squares = Math.Min((bounds.Width / squareSize), maxSquares) Dim start As Integer = (bounds.Width - (squares * squareSize)) / 2 Dim Y As Integer = bounds.Y + 1 Dim dark As Brush = New SolidBrush(objColorTable.GripDark) Dim middle As Brush = New SolidBrush(objColorTable.ToolStripBorder) Dim light As Brush = New SolidBrush(objColorTable.ToolStripDropDownBackground) Dim idx As Integer = 0 While idx < squares g.FillRectangle(dark, start, Y, boxSize, boxSize) g.FillRectangle(light, start + 1, Y + 1, boxSize, boxSize) g.FillRectangle(middle, start + 1, Y + 1, 1, 1) start += squareSize System.Math.Min(System.Threading.Interlocked.Increment(idx), idx - 1) End While dark.Dispose() middle.Dispose() light.Dispose() End If End If End If sender.splitterwidth = 6 End Sub End Class
regards...
Hi,
Zuperman, thanks for the sharing of this code but I've got some trouble with it! See the two lines!
Thanks in advance,Quote:
Originally Posted by zuperman
sparrow1
partial class :( grrrr....
i will attach all the solution project for this component...
chang it at your will...
regards...