Results 1 to 11 of 11

Thread: [RESOLVED] Splitter

  1. #1

    Thread Starter
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Resolved [RESOLVED] Splitter

    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...
    Attached Images Attached Images  
    Help keep this forum clean: Remember to mark your thread as resolved · Search before you post · Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    · Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    · NuGet package Manager · PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    · Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    · 4096 MB, DDR3 PC3-8500F (533 MHz), Kingston · ATI Mobility Radeon HD 5470 · 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    · VB.NET · JAVA · PHP · Javascript
    Other:
    XML
    · HTML · CSS · JQuery · SQL



    *** Proudly Portuguese ***

  2. #2

    Thread Starter
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Re: Splitter

    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...
    Help keep this forum clean: Remember to mark your thread as resolved · Search before you post · Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    · Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    · NuGet package Manager · PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    · Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    · 4096 MB, DDR3 PC3-8500F (533 MHz), Kingston · ATI Mobility Radeon HD 5470 · 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    · VB.NET · JAVA · PHP · Javascript
    Other:
    XML
    · HTML · CSS · JQuery · SQL



    *** Proudly Portuguese ***

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Splitter

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Re: Splitter

    done... used your sig links and converted...had to make some adjustments... looking good now
    Attached Images Attached Images  
    Help keep this forum clean: Remember to mark your thread as resolved · Search before you post · Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    · Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    · NuGet package Manager · PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    · Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    · 4096 MB, DDR3 PC3-8500F (533 MHz), Kingston · ATI Mobility Radeon HD 5470 · 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    · VB.NET · JAVA · PHP · Javascript
    Other:
    XML
    · HTML · CSS · JQuery · SQL



    *** Proudly Portuguese ***

  5. #5
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: [RESOLVED] Splitter

    That looks really good zuperman! Very pretty Gui, and not over the top!

  6. #6

    Thread Starter
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Re: [RESOLVED] Splitter

    Quote Originally Posted by |2eM!x
    That looks really good zuperman! Very pretty Gui, and not over the top!
    thx... im doing my best...regards...
    Help keep this forum clean: Remember to mark your thread as resolved · Search before you post · Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    · Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    · NuGet package Manager · PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    · Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    · 4096 MB, DDR3 PC3-8500F (533 MHz), Kingston · ATI Mobility Radeon HD 5470 · 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    · VB.NET · JAVA · PHP · Javascript
    Other:
    XML
    · HTML · CSS · JQuery · SQL



    *** Proudly Portuguese ***

  7. #7
    Hyperactive Member
    Join Date
    Sep 2005
    Location
    Alaska
    Posts
    435

    Re: [RESOLVED] Splitter

    DevComponent's DotNetBar has an excellent splitter control for VB/C# 2003/2005. Including awesome Office 2007 controls.

  8. #8

    Thread Starter
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Re: [RESOLVED] Splitter

    Quote Originally Posted by tylerm
    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...
    Help keep this forum clean: Remember to mark your thread as resolved · Search before you post · Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    · Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    · NuGet package Manager · PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    · Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    · 4096 MB, DDR3 PC3-8500F (533 MHz), Kingston · ATI Mobility Radeon HD 5470 · 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    · VB.NET · JAVA · PHP · Javascript
    Other:
    XML
    · HTML · CSS · JQuery · SQL



    *** Proudly Portuguese ***

  9. #9

    Thread Starter
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Re: [RESOLVED] Splitter

    sharing the code

    VB Code:
    1. Imports System.Drawing
    2. Imports System.Drawing.Drawing2D
    3. Imports System.Windows.Forms
    4.  
    5. Public Class mySplitContainer
    6.  
    7.     Dim objColorTable As New ProfessionalColorTable
    8.     Dim mcolGradientStart As Color = objColorTable.OverflowButtonGradientMiddle
    9.     Dim mcolGradientEnd As Color = objColorTable.OverflowButtonGradientEnd
    10.  
    11.     Property SplitterColorStart() As Color
    12.         Get
    13.             SplitterColorStart = mcolGradientStart
    14.         End Get
    15.         Set(ByVal Value As Color)
    16.             mcolGradientStart = Value
    17.         End Set
    18.     End Property
    19.  
    20.     Property SplitterColorEnd() As Color
    21.         Get
    22.             SplitterColorEnd = mcolGradientEnd
    23.         End Get
    24.         Set(ByVal Value As Color)
    25.             mcolGradientEnd = Value
    26.         End Set
    27.     End Property
    28.  
    29.  
    30.     Private Sub mySplitContainer_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
    31.  
    32.         Dim bounds As Rectangle = sender.SplitterRectangle
    33.         Dim squares As Integer
    34.         Dim maxSquares As Integer = 9
    35.         Dim squareSize As Integer = 4
    36.         Dim boxSize As Integer = 2
    37.         Dim enuOrientation As Orientation = sender.orientation
    38.         Dim g As Graphics = e.Graphics
    39.         Dim Colorbegin As Color = mcolGradientStart
    40.         Dim Colorend As Color = mcolGradientEnd
    41.  
    42.         If (bounds.Width > 0) AndAlso (bounds.Height > 0) Then
    43.  
    44.             If enuOrientation = Windows.Forms.Orientation.Vertical Then
    45.  
    46.                 Dim b As Brush = New LinearGradientBrush(bounds, Colorbegin, Colorend, LinearGradientMode.Horizontal)
    47.  
    48.                 Try
    49.                     g.FillRectangle(b, bounds)
    50.                 Finally
    51.                     CType(b, IDisposable).Dispose()
    52.                 End Try
    53.  
    54.                 If (bounds.Height > squareSize) AndAlso (bounds.Width > squareSize) Then
    55.  
    56.                     squares = Math.Min((bounds.Height / squareSize), maxSquares)
    57.                     Dim start As Integer = (bounds.Height - (squares * squareSize)) / 2
    58.                     Dim X As Integer = bounds.X + 1
    59.                     Dim dark As Brush = New SolidBrush(objColorTable.GripDark)
    60.                     Dim middle As Brush = New SolidBrush(objColorTable.ToolStripBorder)
    61.                     Dim light As Brush = New SolidBrush(objColorTable.ToolStripDropDownBackground)
    62.                     Dim idx As Integer = 0
    63.  
    64.                     While idx < squares
    65.                         g.FillRectangle(dark, X, start, boxSize, boxSize)
    66.                         g.FillRectangle(light, X + 1, start + 1, boxSize, boxSize)
    67.                         g.FillRectangle(middle, X + 1, start + 1, 1, 1)
    68.                         start += squareSize
    69.                         System.Math.Min(System.Threading.Interlocked.Increment(idx), idx - 1)
    70.                     End While
    71.  
    72.                     dark.Dispose()
    73.                     middle.Dispose()
    74.                     light.Dispose()
    75.  
    76.                 End If
    77.  
    78.             Else
    79.  
    80.                 Dim b As Brush = New LinearGradientBrush(bounds, Colorbegin, Colorend, LinearGradientMode.Vertical)
    81.                 Try
    82.                     g.FillRectangle(b, bounds)
    83.                 Finally
    84.                     CType(b, IDisposable).Dispose()
    85.                 End Try
    86.  
    87.                 If (bounds.Width > squareSize) AndAlso (bounds.Height > squareSize) Then
    88.  
    89.                     squares = Math.Min((bounds.Width / squareSize), maxSquares)
    90.                     Dim start As Integer = (bounds.Width - (squares * squareSize)) / 2
    91.                     Dim Y As Integer = bounds.Y + 1
    92.                     Dim dark As Brush = New SolidBrush(objColorTable.GripDark)
    93.                     Dim middle As Brush = New SolidBrush(objColorTable.ToolStripBorder)
    94.                     Dim light As Brush = New SolidBrush(objColorTable.ToolStripDropDownBackground)
    95.                     Dim idx As Integer = 0
    96.  
    97.                     While idx < squares
    98.                         g.FillRectangle(dark, start, Y, boxSize, boxSize)
    99.                         g.FillRectangle(light, start + 1, Y + 1, boxSize, boxSize)
    100.                         g.FillRectangle(middle, start + 1, Y + 1, 1, 1)
    101.                         start += squareSize
    102.                         System.Math.Min(System.Threading.Interlocked.Increment(idx), idx - 1)
    103.                     End While
    104.  
    105.                     dark.Dispose()
    106.                     middle.Dispose()
    107.                     light.Dispose()
    108.                 End If
    109.  
    110.             End If
    111.  
    112.         End If
    113.  
    114.         sender.splitterwidth = 6
    115.  
    116.     End Sub
    117.  
    118. End Class

    regards...
    Help keep this forum clean: Remember to mark your thread as resolved · Search before you post · Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    · Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    · NuGet package Manager · PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    · Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    · 4096 MB, DDR3 PC3-8500F (533 MHz), Kingston · ATI Mobility Radeon HD 5470 · 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    · VB.NET · JAVA · PHP · Javascript
    Other:
    XML
    · HTML · CSS · JQuery · SQL



    *** Proudly Portuguese ***

  10. #10
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [RESOLVED] Splitter

    Hi,

    Zuperman, thanks for the sharing of this code but I've got some trouble with it! See the two lines!

    Quote Originally Posted by zuperman
    sharing the code

    VB Code:
    1. Public Class mySplitContainer
    2.  
    3.     Dim objColorTable As New [COLOR=Red]ProfessionalColorTable[/COLOR]  
    4. ' Have some trouble with this line: Type 'ProfessionalColorTable' is not defined.
    5.  
    6.  
    7.     Private Sub mySplitContainer_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles [COLOR=Red]Me.Paint[/COLOR]
    8. ' Have some trouble with this line: Keyword is not valid as an identifier.

    regards...
    Thanks in advance,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  11. #11

    Thread Starter
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Re: [RESOLVED] Splitter

    partial class grrrr....

    i will attach all the solution project for this component...

    chang it at your will...
    regards...
    Attached Files Attached Files
    Help keep this forum clean: Remember to mark your thread as resolved · Search before you post · Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    · Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    · NuGet package Manager · PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    · Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    · 4096 MB, DDR3 PC3-8500F (533 MHz), Kingston · ATI Mobility Radeon HD 5470 · 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    · VB.NET · JAVA · PHP · Javascript
    Other:
    XML
    · HTML · CSS · JQuery · SQL



    *** Proudly Portuguese ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width