• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Visual Basic problem.

Status
Not open for further replies.
Level 9
Joined
Apr 28, 2009
Messages
538
Do anybody knows why the actions executed at MouseHover and MouseLeave events take so long to be executed?


For example, let's say i have a button on my form with red background color and i want the color to change to black when the user moves the mose within the button area.

The color changes, but way to slow (almost after 1 second)


Note: I use the [MyButton].BackColor = Color.[MyColor]

Code:
Public Class Form1

    Private Sub Button8_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button8.MouseHover
        Button1.BackColor = Color.Black
    End Sub

    Private Sub Button8_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button8.MouseLeave
        Button1.BackColor = Color.Red
    End Sub

End Class

How can i make the color to change instantly?

Thanks!
 
Which version of VB do you use? Looks like .NET to me, although I've used it only once ^^
I don't know if you can use this on .NET, but I strongly recommend it (and colours change really fast here).
 
Try using "MouseEnter" event instead of "MouseHover".

This is correct. Hover doesn't occur until a specific period of time passes while your mouse pointer is inside the object (in this case, 1 second). If you change it to MouseEnter, it should work.
 
I wish i could show you but my visual studio 2005 and 2008 express editions both don't work because i have to register...

You don't need to register if you install the Visual Studio from an image file. You need to register only if you use the web installer (which you probably did).

You can download the image file here:

Code:
http://www.microsoft.com/express/download

Simply scroll all the way down, there's an 'Offline Install' section, choose your language and click download.
The file's size is 750MB.
 
Status
Not open for further replies.
Back
Top