p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Visual Basic 2008 Essentials If you are new to Visual Basic programming with version 2008, this is the place to start your questions.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2008 Essentials section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 21st, 2009, 08:03 AM
Registered User
Points: 16, Level: 1
Points: 16, Level: 1 Points: 16, Level: 1 Points: 16, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2007
Location: , , United Kingdom.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mousehover

Code:
Private Sub frmGraphTT_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseHover
        sender = ChartBox
        Dim XYpoint As Point
        XYpoint.X = MousePosition.X
        XYpoint.Y = MousePosition.Y
        'ChartBox.onmousehover(e) - gives a Protected error?

        If Cregion.IsVisible(XYpoint.X, XYpoint.Y) = True Then
            Debug.Print("1209 hit")
        Else
            Debug.Print("1216 miss")

        End If
    End Sub
I have a form with a picturebox called Chartbox and I'm trying to fire a mousehover event when the mouse is over a drawn region (Cregion). My code is not working, can anyone help, please?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old September 14th, 2009, 04:33 PM
Friend of Wrox
Points: 797, Level: 10
Points: 797, Level: 10 Points: 797, Level: 10 Points: 797, Level: 10
Activity: 2%
Activity: 2% Activity: 2% Activity: 2%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Tycoon Ted View Post
Code:
Private Sub frmGraphTT_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseHover
        sender = ChartBox
        Dim XYpoint As Point
        XYpoint.X = MousePosition.X
        XYpoint.Y = MousePosition.Y
        'ChartBox.onmousehover(e) - gives a Protected error?

        If Cregion.IsVisible(XYpoint.X, XYpoint.Y) = True Then
            Debug.Print("1209 hit")
        Else
            Debug.Print("1216 miss")

        End If
    End Sub
I have a form with a picturebox called Chartbox and I'm trying to fire a mousehover event when the mouse is over a drawn region (Cregion). My code is not working, can anyone help, please?

For starters
Code:
sender = ChartBox
The value of the sender should be assigned to an object

Secondly why are you trying to fire an onmousehover event when you haven't check to see if the box is currently under the mouse

Thirdly you should be using the picture boxes mousehover event to check whether its over a region!

And just to give you a hint look at a special property within the control which converts locations into control locations and stuff!

Goodluck
__________________
Apocolypse2005, I'm a programmer - of sorts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump



All times are GMT -4. The time now is 04:28 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc