Hey guys, I know sometimes you want a more colorful button unlike the traditional Windows Form button, so here's how you can make one pretty easily.
First of all, drag one label onto the form, and change the properties as follows:
- BackColor = Red (Or really any color you desire.)
- BorderStyle = FixedSingle
- Font:
- Size = 10
- Bold = True
- Text = Click Here!
Now, enter this code into the form:
Now the code really isn't what makes this in any way special, it's just that some people may not have realized that this is so easy to do.
Yup, so have fun!
By the way, the pictures aren't too pretty, but hopefully they'll get the point across.
First of all, drag one label onto the form, and change the properties as follows:
- BackColor = Red (Or really any color you desire.)
- BorderStyle = FixedSingle
- Font:
- Size = 10
- Bold = True
- Text = Click Here!
Now, enter this code into the form:
PHP:
Public Class Form1
Private Sub Label1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseClick
Label1.BorderStyle = BorderStyle.FixedSingle
'Code to perform when button is clicked below
End Sub
Private Sub Label1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown
Label1.BorderStyle = BorderStyle.Fixed3D
End Sub
End Class
Now the code really isn't what makes this in any way special, it's just that some people may not have realized that this is so easy to do.
Yup, so have fun!
By the way, the pictures aren't too pretty, but hopefully they'll get the point across.