|
-
Oct 3rd, 2014, 09:12 AM
#1
Thread Starter
Member
[THEME] Butterscotch Theme GDI+ 20 Controls VB.Net
Butterscotch Theme GDI+ - My Sixth Theme
Inspiration & Credit to all Theme Creators of the HF
Controls -
1) Butterscotch Theme (with Border & Blinking caption)
2) Butterscotch Alert Box (with Success, Error, Info option)
3) Butterscotch Button
4) Butterscotch Check Box
5) Butterscotch Combo Box
6) Butterscotch Control Box (Minimize & Maximize buttons can be disabled)
7) Butterscotch Group Box
8) Butterscotch Horizontal Separator
9) Butterscotch Label (Show/Hide Border)
10) Butterscotch List Box
11) Butterscotch Panel
12) Butterscotch Progress Bar (Show/Hide Percentage Value)
13) Butterscotch Progress Button (Combination of Button & Progress Bar)
14) Butterscotch Radio Button
15) Butterscotch Tab Control
16) Butterscotch Text Box
17) Butterscotch Toggle
18) Butterscotch Vertical Progress Bar (Show/Hide Percentage Value)
19) Butterscotch Vertical Separator
20) Butterscotch Vertical Tab Control
Screenshot -
Original Image -
My Theme -
Colours & shape changed as it may look similar with Lord Pankake's Theme if he makes it...
Download -
http://pastebin.com/Cw0nUHtj
Note -
1) This is my Sixth Theme... written while learning so it may have bugs...
2) Theme is coded without Themebase...
3) Constructive Criticism & Suggestions are always welcome...
4) Please leave comments for encouragement...
5) Will add more controls if you find it useful & need arises...
6) Credits to "Aeonhack" for Roundrect function...
7) Credits to "Mephobia" for NoiseBrush Function...
8) AlertBox Control idea taken from "iSynthesis'" Flat UI theme
Regards
Saket
-
Oct 30th, 2014, 12:13 AM
#2
Addicted Member
Re: [THEME] Butterscotch Theme GDI+ 20 Controls VB.Net
he is very very good...very very good...
-
Nov 30th, 2014, 03:49 PM
#3
Fanatic Member
Re: [THEME] Butterscotch Theme GDI+ 20 Controls VB.Net
What is this?
what is it for?
How do I use it.
I am not being a smart*ss . I am clueless, I've loaded the code and run it ? What now?
Thank for helping to understand
george
-
Nov 30th, 2014, 04:50 PM
#4
Re: [THEME] Butterscotch Theme GDI+ 20 Controls VB.Net
How did you load the code?
One way to play with it:
Start a new project.
Add a Module file from the Build menu.
Paste the Butterscotch code in place of the default code added to the module.
Build the project from the Build menu.
Now, if you're on the Form design page, select Toolbox and you should see a list of a bunch of "Butterscotch" controls that you can use on your form.
-
Dec 1st, 2014, 12:54 AM
#5
Re: [THEME] Butterscotch Theme GDI+ 20 Controls VB.Net
I gave it a quick try, adding some buttons, and was a bit surprised there was no feedback when you pressed a button.
The Rollover indication and mousedown indication are the same, so nothing appears to happen when you press the button.
So, I added a line to do the standard shift down and to the right one pixel in the mouse down state.
In the OnPaint override sub of the ButterscotchButton class added the indicated (<=====) TranslateTransform line
<edit> I checked a "regular" winform button and noticed it doesn't do the button shift to indicate selection. It just changes to a slightly darker background color.
I guess the code should be changed to draw a darker gradientBrush for mousedown, rather then do the transformTranslate (although I didn't think the movement looked all that bad).
</edit>
Code:
Case MouseState.Down
Dim buttonrectdown As New LinearGradientBrush(innerrect, Color.FromArgb(48, 43, 39), Color.FromArgb(100, 90, 80), LinearGradientMode.Vertical)
g.TranslateTransform(1, 1) '<===== Indicate button press by shifting button down and right one pixel
g.FillPath(New SolidBrush(Color.FromArgb(26, 25, 21)), RoundRect(rect, 3))
g.FillPath(buttonrectdown, RoundRect(innerrect, 3))
g.DrawString(Text, btnfont, Brushes.White, innerrect, New StringFormat() With {.Alignment = StringAlignment.Center, .LineAlignment = StringAlignment.Center})
p.s. Also noticed that the order of action in the toggle button and radio button's OnClick event processing are out of order.
It is common in the application level Click event of radio and checkbox controls to check the current state of the control. The new state of the control, as a result of clicking on the control is set before the user gets the click event.
In the Butterscotch controls, the new state was set after the application level click event was generated, so you are looking at the previous state in the click event, not the current state.
For example, the Toggle button code was
Code:
Protected Overrides Sub OnClick(ByVal e As EventArgs)
MyBase.OnClick(e)
If Not Checked Then Checked = True Else Checked = False
End Sub
Calling the default processing, MyBase.OnClick(e), before doing the local processing is the issue.
So I changed the code to:
Code:
Protected Overrides Sub OnClick(ByVal e As EventArgs)
Checked = Not Checked
MyBase.OnClick(e)
End Sub
Now the Checked state gets toggled before the default processing is done, so is already changed when the user gets the Click Event.
Also, since we're just toggling a boolean, got rid of the If Then Else statement and just toggle the boolean.
Last edited by passel; Dec 1st, 2014 at 01:56 AM.
-
Dec 6th, 2014, 11:52 AM
#6
Thread Starter
Member
Re: [THEME] Butterscotch Theme GDI+ 20 Controls VB.Net
 Originally Posted by passel
I gave it a quick try, adding some buttons, and was a bit surprised there was no feedback when you pressed a button.
The Rollover indication and mousedown indication are the same, so nothing appears to happen when you press the button.
So, I added a line to do the standard shift down and to the right one pixel in the mouse down state.
In the OnPaint override sub of the ButterscotchButton class added the indicated (<=====) TranslateTransform line
<edit> I checked a "regular" winform button and noticed it doesn't do the button shift to indicate selection. It just changes to a slightly darker background color.
I guess the code should be changed to draw a darker gradientBrush for mousedown, rather then do the transformTranslate (although I didn't think the movement looked all that bad).
</edit>
Code:
Case MouseState.Down
Dim buttonrectdown As New LinearGradientBrush(innerrect, Color.FromArgb(48, 43, 39), Color.FromArgb(100, 90, 80), LinearGradientMode.Vertical)
g.TranslateTransform(1, 1) '<===== Indicate button press by shifting button down and right one pixel
g.FillPath(New SolidBrush(Color.FromArgb(26, 25, 21)), RoundRect(rect, 3))
g.FillPath(buttonrectdown, RoundRect(innerrect, 3))
g.DrawString(Text, btnfont, Brushes.White, innerrect, New StringFormat() With {.Alignment = StringAlignment.Center, .LineAlignment = StringAlignment.Center})
p.s. Also noticed that the order of action in the toggle button and radio button's OnClick event processing are out of order.
It is common in the application level Click event of radio and checkbox controls to check the current state of the control. The new state of the control, as a result of clicking on the control is set before the user gets the click event.
In the Butterscotch controls, the new state was set after the application level click event was generated, so you are looking at the previous state in the click event, not the current state.
For example, the Toggle button code was
Code:
Protected Overrides Sub OnClick(ByVal e As EventArgs)
MyBase.OnClick(e)
If Not Checked Then Checked = True Else Checked = False
End Sub
Calling the default processing, MyBase.OnClick(e), before doing the local processing is the issue.
So I changed the code to:
Code:
Protected Overrides Sub OnClick(ByVal e As EventArgs)
Checked = Not Checked
MyBase.OnClick(e)
End Sub
Now the Checked state gets toggled before the default processing is done, so is already changed when the user gets the Click Event.
Also, since we're just toggling a boolean, got rid of the If Then Else statement and just toggle the boolean.
Thanks for the info, i will look into it
-
Dec 7th, 2014, 01:24 AM
#7
Lively Member
Re: [THEME] Butterscotch Theme GDI+ 20 Controls VB.Net
Hey. I very liked your theme.
My question is, what is the license? Can I use it in my projects freely? Thanks!
-
Dec 8th, 2014, 07:56 AM
#8
Thread Starter
Member
Re: [THEME] Butterscotch Theme GDI+ 20 Controls VB.Net
 Originally Posted by Zeev
Hey. I very liked your theme.
My question is, what is the license? Can I use it in my projects freely? Thanks!
It's shared as free... You can use it the way you want but just don't remove credits provided at start. You can even edit it, change colours etc... 
To use it just add new class to your project add complete theme contents to it, then compile & add controls the way you add normal controls...
Regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|