Jump to content

buttons with effect

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
21 replies to this topic

#1
ikkeugh

ikkeugh

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
Hello , i've got a question : How do you make these mouse over buttons in Visual Basic 6.0 ?
I want them to look like this .

You can download the program and see it for yourself , but I made a vid , so it would be easier . (mov and wmv)

So how do I make these buttons ?
I think it's an effect ...

You can see an equal effect on this site
APRON WEB TUTORIALS HTML
Just click on something .

Attached Files



#2
o0TheNerd0o

o0TheNerd0o

    Learning Programmer

  • Members
  • PipPipPip
  • 61 posts
First of all, If you're using the CommandButton... the only thing you can change is the BackColor(background). You cannot change the ForeColor(font color). I'm not entirely sure why this is the way it is. My suggestion to accomplish something similar to the website you provided is to create custom pictures and just handle the changing in MouseMove/Click.
Option Explicit
:cool:

#3
ikkeugh

ikkeugh

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
Well , i'm not using a commandbutton , but images ,
But when i use the images , the effect isn't there yet
My question is how to do this ...

#4
o0TheNerd0o

o0TheNerd0o

    Learning Programmer

  • Members
  • PipPipPip
  • 61 posts
Well, I'm not entirely sure on exactly what you want to do. But if you're using "Image" objects, they have MouseMove, MouseDown, and MouseUp functions. Just break down what you're trying to accomplish. Before, during, and after click. To change the picture of an "Image" object is:

Image1.Picture = LoadPicture("somepicture.bmp")

Just put this code(with appropriate picture path) in correct sub procedure(MouseUp, MouseDown, MouseMove).
Option Explicit
:cool:

#5
ikkeugh

ikkeugh

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
Please look at my first post ...
The effect i'm trying to get is to let the 2 images flow into eachother .
Examine the first post very carefully :p

#6
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Ok Simple!

Make 3 Image objects. Insert 1 Image in Image1 object, insert another image in the Image2 object, And leave Empty Image3 object

Then add this code:

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image3.Picture = Image1.Picture
End Sub

Private Sub Image3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image3.Picture = Image2.Picture
End Sub
Now every time your mouse goes over the Image3 object, it will change in the Image2 picture, and when it goes off, it will turn back to image1.

Simple! Hope it helps.

#7
o0TheNerd0o

o0TheNerd0o

    Learning Programmer

  • Members
  • PipPipPip
  • 61 posts
Why have 3 image controls when you can do it with one? Just have 2 different .bmp files. The first one, Idle.bmp, is when you do not have the mouse over. Then make another, Move.bmp, the picture you when you have the mouse over. Even simpler :-)


Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Image1.Picture = LoadPicture("Idle.bmg")
End Sub

Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Image1.Picture = LoadPicture("Move.bmp")
End Sub


TheComputerMaster, can someone say n00b?!?!?? Haha, I loved your 1337 thing. Its amazing. Loser. Buy a book or something.
Option Explicit
:cool:

#8
ikkeugh

ikkeugh

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
PLEASE look at my first post ,
I had all the things you proposed , but i need an effect .
If you look at the movies , you'll see that the first image disappeares and the second in place , with some miliseconds between .They dissolve into eachother.

#9
o0TheNerd0o

o0TheNerd0o

    Learning Programmer

  • Members
  • PipPipPip
  • 61 posts
If you want the dissolving effect, you'll probably have to do some api calls. Or maybe just some color fades within a timer. There are also a lot of different vb button maker software too. Just do a google search, i.e.: 'button effects in vb'
Option Explicit
:cool:

#10
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts

ikkeugh said:

PLEASE look at my first post ,
I had all the things you proposed , but i need an effect .
If you look at the movies , you'll see that the first image disappeares and the second in place , with some miliseconds between .They dissolve into eachother.

You can make that with some patience and a timer :) if you don't want to use API. But that will require a lot of time!! So (If even possible) use API, but if not possible use some Photoshop and VB.. but again it will make it long.

And for 'TheNerd' the suggestion you made is a non-sense, why would he want to give the images with the program, if he can embed them into the EXE it's self!? Software Security my man! I bet he doesn't want his application to be easily modded.

#11
o0TheNerd0o

o0TheNerd0o

    Learning Programmer

  • Members
  • PipPipPip
  • 61 posts
When you compile a vb application, it embeds the images you dumb a ss! Along with icons, .wavs, etc. God, you are a f ucking noob. Its quite sad and pathetic. Also doing it this way saves memory and keeps file size down. Lol, take a course or two while you're at it.

And by the way... "it's self" is incorrect. Its "itself". English course too.
Option Explicit
:cool:

#12
ikkeugh

ikkeugh

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
How to do it with a timer ?