Closed Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: buttons with effect

  1. #1
    ikkeugh is offline Learning Programmer
    Join Date
    Sep 2007
    Posts
    79
    Rep Power
    0

    buttons with effect

    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 Attached Files

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    o0TheNerd0o's Avatar
    o0TheNerd0o is offline Learning Programmer
    Join Date
    Sep 2007
    Location
    I.E. So-cal
    Posts
    61
    Rep Power
    0
    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

  4. #3
    ikkeugh is offline Learning Programmer
    Join Date
    Sep 2007
    Posts
    79
    Rep Power
    0
    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 ...

  5. #4
    o0TheNerd0o's Avatar
    o0TheNerd0o is offline Learning Programmer
    Join Date
    Sep 2007
    Location
    I.E. So-cal
    Posts
    61
    Rep Power
    0
    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:

    Code:
    Image1.Picture = LoadPicture("somepicture.bmp")
    Just put this code(with appropriate picture path) in correct sub procedure(MouseUp, MouseDown, MouseMove).
    Option Explicit

  6. #5
    ikkeugh is offline Learning Programmer
    Join Date
    Sep 2007
    Posts
    79
    Rep Power
    0
    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

  7. #6
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    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:

    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.

  8. #7
    o0TheNerd0o's Avatar
    o0TheNerd0o is offline Learning Programmer
    Join Date
    Sep 2007
    Location
    I.E. So-cal
    Posts
    61
    Rep Power
    0
    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 :-)

    Code:
    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

  9. #8
    ikkeugh is offline Learning Programmer
    Join Date
    Sep 2007
    Posts
    79
    Rep Power
    0
    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.

  10. #9
    o0TheNerd0o's Avatar
    o0TheNerd0o is offline Learning Programmer
    Join Date
    Sep 2007
    Location
    I.E. So-cal
    Posts
    61
    Rep Power
    0
    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

  11. #10
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    Quote Originally Posted by ikkeugh View Post
    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.
    Last edited by TcM; 09-19-2007 at 02:14 PM.

Closed Thread
Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. 3D Cube Effect?
    By Wanch in forum Linux Hardware
    Replies: 12
    Last Post: 02-05-2009, 05:55 AM
  2. Fire graphics effect
    By subo in forum Classes and Code Snippets
    Replies: 0
    Last Post: 01-23-2009, 01:44 PM
  3. sound effect
    By dman4real in forum JavaScript and CSS
    Replies: 2
    Last Post: 01-20-2009, 12:23 PM
  4. Different effect
    By Jaan in forum JavaScript and CSS
    Replies: 2
    Last Post: 07-31-2008, 06:00 AM
  5. effect of b = a++ + a++
    By qwertyuiop in forum C and C++
    Replies: 5
    Last Post: 01-22-2008, 04:47 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts