dcsimg
Results 1 to 11 of 11

Thread: WinForms Bootstrap Theme

  1. #1

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,569

    WinForms Bootstrap Theme

    This is a work in progress, but here is a library that I've been working on that mimics twitter-bootstrap 4.3.

    Control
    • Base Class
    • Rounded edge control
    • Function to calculate REM


    Alert
    • Dismissable - i.e. a close icon appears in the upper-right hand corner, once the close icon is clicked it destroys the control.
    • Fadable - i.e. when the Dismiss method is called, it slowly causes the control to fade away.


    Button
    • IsOutline - Allows the button to just contain a border
    • MouseOver, MouseEnter, and Disabled styles the button


    Long story short, I started doing a lot of web development and realized how crappy WinForm applications look.

    Here is a screenshots of the work in progress:
    Name:  tempsnip.jpg
Views: 1521
Size:  15.9 KB

    Code was too large to include in a post, here is the file: Bootstrap.vb

  2. #2
    PowerPoster
    Join Date
    Feb 2016
    Location
    Tennessee
    Posts
    2,421

    Re: WinForms Bootstrap Theme

    Very Nice Dd, I love this kind of stuff!!

  3. #3
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,523

    Re: WinForms Bootstrap Theme

    Have you considered doing a TextBox with a focus glow like shown below?

    Name:  F1.png
Views: 894
Size:  37.3 KB

  4. #4

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,569

    Re: WinForms Bootstrap Theme

    Yep, I’m actually moving onto form inputs next.

  5. #5
    PowerPoster
    Join Date
    Feb 2016
    Location
    Tennessee
    Posts
    2,421

    Re: WinForms Bootstrap Theme

    Nice Job dday... You always do good! And of course you too Karen

  6. #6
    New Member
    Join Date
    Dec 2015
    Location
    India
    Posts
    10

    Re: WinForms Bootstrap Theme

    better you can provide full sample project

  7. #7
    New Member
    Join Date
    May 2020
    Posts
    15

    Re: WinForms Bootstrap Theme

    I liked the topic very much, but I do not know how to use the attached class .. I wish clarification steps

  8. #8

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,569

    Re: WinForms Bootstrap Theme

    Quote Originally Posted by vbxprogrammer View Post
    I liked the topic very much, but I do not know how to use the attached class .. I wish clarification steps
    1. Add the file to your project
    2. Build the solution
    3. You can either drag and drop the controls onto your form using the form designer or you can create new instances of the controls via code

  9. #9
    New Member
    Join Date
    May 2020
    Posts
    15

    Re: WinForms Bootstrap Theme

    Quote Originally Posted by dday9 View Post
    1. Add the file to your project
    2. Build the solution
    3. You can either drag and drop the controls onto your form using the form designer or you can create new instances of the controls via code
    You are awesome and thank you very much ..
    I know your time is short and you may be too busy .. But
    I have hope and ambition ... that you will help me to show the tools as in the picture on the topic above ... because I did not understand what is meant by : (( you can create new instances of the controls via code )) !!
    waiting your answer ...

  10. #10

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,569

    Re: WinForms Bootstrap Theme

    The steps to create a new instance of the control via code (as opposed to just using the form designer) would be to:
    1. (optional) Import the namespace of the file (Bootstrap, Bootstrap.Control, etc.)
    2. Generate the Form's Load event or New constructor
    3. Declare a new instance of one of the controls
    4. Add the control to the form


    An example using the Button control that's included:
    Code:
    Public Class Form1
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
            Dim btn As New Bootstrap.Control.Button() With {
                .Location = New Point(5, 5),
                .Size = New Size(150, 150),
                .StyleType = Bootstrap.Control.Button.StyleType.Primary,
                .Text = "Click Me"
            }
            Me.Controls.Add(btn)
        End Sub
    End Class

  11. #11
    New Member
    Join Date
    May 2020
    Posts
    15

    Re: WinForms Bootstrap Theme

    Quote Originally Posted by dday9 View Post
    The steps to create a new instance of the control via code (as opposed to just using the form designer) would be to:
    1. (optional) Import the namespace of the file (Bootstrap, Bootstrap.Control, etc.)
    2. Generate the Form's Load event or New constructor
    3. Declare a new instance of one of the controls
    4. Add the control to the form


    An example using the Button control that's included:
    Code:
    Public Class Form1
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
            Dim btn As New Bootstrap.Control.Button() With {
                .Location = New Point(5, 5),
                .Size = New Size(150, 150),
                .StyleType = Bootstrap.Control.Button.StyleType.Primary,
                .Text = "Click Me"
            }
            Me.Controls.Add(btn)
        End Sub
    End Class
    Wonderful .. beautiful .. .. remains a question:
    How to change the design of the form in the same way. And increase the shadow of the textbox limit

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width