Results 1 to 5 of 5

Thread: VB Background

  1. #1

    Thread Starter
    New Member oakenfold's Avatar
    Join Date
    Nov 2001
    Location
    Creamfields
    Posts
    6

    Talking VB Background

    is it possible 2 make a background on VB so when the mouse pointer goes over the background, the colour changes into different colours!!

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Try putting it into a PictureBox, and make the picture box have borderstyle = vbNone. Then use the MouseMove event to change colors.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    VB Code:
    1. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.     Me.BackColor = Me.BackColor + 200
    3. End Sub
    -= a peet post =-

  4. #4
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Peet:

    That code will crash if you move the mouse around on the box a lot ("Overflow" errors)
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  5. #5
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    details, details, details

    VB Code:
    1. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.     On error Goto xit
    3.     Me.BackColor = Me.BackColor + 200
    4.     Exit Sub
    5. xit:
    6.     Me.BackColor = 0
    7. End Sub
    -= a peet post =-

Posting Permissions

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



Click Here to Expand Forum to Full Width