Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[Short TUT] Making a rollover button that flashes [Short TUT]

Hi guys I am going to show you how to make a rollover button that flashes when you rollover it.

To start with you will need 2 images.
- Don't HAVE to be same size but it looks better
- Prefibly the same image, E.G A blue question mark and then a red question mark

So once you have your 2 images, I'm going to use 2 question marks from RuneScape, open up VB and make a new project and then add 2 "Picture boxes"

[IMG]http://i48.[censored].com/20qakxf.jpg[/IMG]

Now once you have done that, go to the one you want to show SECOND and go to properites then scroll down to "visible" and set as "false"

[IMG]http://i48.[censored].com/182bs1.jpg[/IMG]

Now, double click the first picture box (the one that is visible at the start) and then go to the top right and select "MouseMove"

[IMG]http://i47.[censored].com/343rlgp.jpg[/IMG]

Now type in this code
Code
PictureBox2.Visible = False
        PictureBox1.Visible = True

Ofcourse replace the "picturebox2" and "picturebox1" with which ones you want.

[IMG]http://i48.[censored].com/29xjhv8.jpg[/IMG]

Now once you have done that, go back onto your form and double click the OTHER button, the one that appears after rolling over the first one, and go to the top right again and select "MouseLeave" and put this code

Code
picturebox1.visible = false
picturebox2.visible = true

[IMG]http://i47.[censored].com/2qwki0k.jpg[/IMG]

And that's it! To make the buttons better, put one on top of the other then it will look like it flashes rather then a different image appearing.


Credits
------------------------------------
%90 to me for making the tutorial
%10 to DarkZero for making THISprogram which made me make the tut.
More tutorials
------------------------------------
Runescape free pin methods - 6 methods
How to upload videos to YouTube (Some ppl don't know)
How to generate random numbers on VB (to make fake keygens etc)
Nice... It is nice ;)
(Mar 5, 2010 04:11 PM)Shu7down Wrote:  Nice... It is nice ;)

Thanks for posting :D
It's better to use a single picturebox and rotate the images from the resources. It's less messy.
(Mar 5, 2010 04:25 PM)Deathader Wrote:  It's better to use a single picturebox and rotate the images from the resources. It's less messy.

Can you please show me the source? Im new at VB as well xD
Far from a TUT, i didnt learn jack shit except how to copy and past crap.

but, i would of done it like the other dude stated, and simply use the "Mouse Enter" & "Mouse Leave" events.

Code
Sub ME handles picturebox1.mouseenter
picturebox1.image = my.resources.image2
end sub

Sub ML handles picturebox1.mouseLeave
picturebox1.image = my.resources.image1
end sub
(Mar 5, 2010 05:04 PM)phyyyyy Wrote:  Far from a TUT, i didnt learn jack shit except how to copy and past crap.

but, i would of done it like the other dude stated, and simply use the "Mouse Enter" & "Mouse Leave" events.

Code
Sub ME handles picturebox1.mouseenter
picturebox1.image = my.resources.image2
end sub

Sub ML handles picturebox1.mouseLeave
picturebox1.image = my.resources.image1
end sub

Well maybe you shouldn't just copy and paste shit and actually read the code yeah?
Very, Very nice and short, I never new this could be done!

Well done mate.
I have this in my tut. And much more!

But, still nice none the less.

We are indeed softbanned.
[Image: tKaYikM.jpg]
FlossinRod has good taste.
[/align]

Thanks for feedback guys :D


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by LeonieHackPetaBytes2Jan 23, 2019 05:10 PM 1 227 Jan 23, 2019 05:10 PM
Last Post: 0xDEAD10CC
[C#] by KaleMar 7, 2016 05:01 PM 4 184 Mar 7, 2016 05:01 PM
Last Post: Kale
[.NET] by DatageniNov 15, 2015 05:48 AM 2 282 Nov 15, 2015 05:48 AM
Last Post: Datageni