Click here to Skip to main content
Click here to Skip to main content
Go to top

Multifunctional Checkbox v2 for Visual Studio .NET

, 2 Jul 2005
Rate this:
Please Sign up or sign in to vote.
Checkboxes with different checked and border styles.

Sample Image - CheckBox.gif

Introduction

This article introduces check boxes with different checked and border styles. The following list shows the different properties and events associated with them.

Properties

  • Caption (String) - Addition of a text.
  • CheckedColor (Color) - Selected color.
  • CheckedState (Boolean) - Checkbox is selected or deselected.
  • CStyle (Enum) - The kind of selected graphics.
  • EnableClickSound (Boolean) - Play sound on click.
  • FocusColor (Color) - Color of rectangle when it gets focus.
  • FStyle (Enum) - Visible style.
  • HoverAnimation (Boolean) - Fade animation when moving.
  • SmoothingMode (SmoothingMode) - Quality of the graphics.
  • StyleKind (Enum) - Kind of visible style.
  • TextFont (Font)- Font of the text.
  • TextColor (Color) - Color of the text.

Events

  • BeforeChanging - Event which will execute before checking.
  • CheckedChanged - Event which will execute after checking.

Examples

  • Show "MessageBox" after click when in "Checked_State":
    Private Sub CheckBox1_CheckedChanged(ByVal _
           Checked_State As Boolean) Handles CheckBox1.CheckedChanged
        MsgBox(Checked_State)
    End Sub
  • Change "ForeColor" of the text after click:
    Private Sub CheckBox1_CheckedChanged(ByVal Checked_State _
                  As Boolean) Handles CheckBox1.CheckedChanged
        CheckBox1.ForeColor = Color.Red
    End Sub
  • Change kind of style after click:
    Private Sub CheckBox1_CheckedChanged(ByVal Checked_State _
                      As Boolean) Handles CheckBox1.CheckedChanged
      'Change CheckBox Style
      CheckBox1.FStyle = CheckBox.CheckBox.Flat_Style.Blue
      'Paint 'X' as checked_State
      CheckBox1.CStyle = CheckBox.CheckBox.Check_style.Draw_X
      'Draw circle as CheckBox field
      CheckBox1.StyleKind = CheckBox.CheckBox.Style_Kind.Circle
    End Sub
  • Change "SmoothingMode":
    Private Sub CheckBox1_CheckedChanged(ByVal Checked_State _
                  As Boolean) Handles CheckBox1.CheckedChanged
        CheckBox1.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
    End Sub

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Loresoft
Web Developer
Germany Germany
No Biography provided

Comments and Discussions

 
QuestionWhere's the source code? PinmemberMember 175014621-May-08 5:27 
GeneralNice But... PinmemberGary Noble2-Jul-06 0:51 
Where's the source!Sigh | :sigh:
Generalcool but Pinmembertom_dx2-Jul-05 16:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140921.1 | Last Updated 2 Jul 2005
Article Copyright 2005 by Loresoft
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid