Custom "Buttons" for your form
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
3 posts
Page 1 of 1
Hello,
As requested here is a quick tutorial on how to add custom buttons to your form for close/minimize etc. You can do this in lots of different ways but the way I do it is like this...
First thing you need to do is get some button images which you can find in hungryhounds kennel, online or make your own. You need 2 images which will be used as follows:
Image 1 - Primary Image
Image 2 - Used for when your mouse hovers over the picturebox
Once youve got your images you need to add them to your projects resources:
Then add a picturebox control to your form for each button you want to create, I used 2 for this tutorial.
Set each pictureboxes image to your primary button image:
Now its time for the code so in each "Picturebox_MouseEnter" event add this code:
Dont forget to change "My.Resources.Image1 and My.Resources.Image2" to the name of your images in resources.
Thats it your finished cooll;
As requested here is a quick tutorial on how to add custom buttons to your form for close/minimize etc. You can do this in lots of different ways but the way I do it is like this...
First thing you need to do is get some button images which you can find in hungryhounds kennel, online or make your own. You need 2 images which will be used as follows:
Image 1 - Primary Image
Image 2 - Used for when your mouse hovers over the picturebox
Once youve got your images you need to add them to your projects resources:
Then add a picturebox control to your form for each button you want to create, I used 2 for this tutorial.
Set each pictureboxes image to your primary button image:
Now its time for the code so in each "Picturebox_MouseEnter" event add this code:
Code: Select all
And in each "Picturebox_MouseLeave" event add this code:PictureBox1.Image = My.Resources.Image2
Code: Select all
Inside each "Picturebox_Click" event add the code you want to execute such as closing the form or minimize the form.PictureBox1.Image = My.Resources.Image1
Dont forget to change "My.Resources.Image1 and My.Resources.Image2" to the name of your images in resources.
Thats it your finished cooll;
You do not have the required permissions to view the files attached to this post.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Hello,
Using the top menu bar click "Project" > "Your project properties" > then click the "Resources" tab then "Add resource" button.
Thank you.
Using the top menu bar click "Project" > "Your project properties" > then click the "Resources" tab then "Add resource" button.
Thank you.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023