Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Pro Visual Basic 2005
|
Pro Visual Basic 2005 For advanced Visual Basic coders working in version 2005. Beginning-level questions will be redirected to other forums, including Beginning VB 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Visual Basic 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 19th, 2007, 01:49 AM
Registered User
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Move image when cursor approaches

Hi,

Can somebody tell me a simple way wherin an image moves on form automatically when a cursor approaches. In nutshell person should not be able to click the image.

Sanjana


 
Old July 19th, 2007, 04:55 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

In the mousemove event compare the mouses location with the image's .Top, .Left, (.Top + .Height) and (.Left + .Width).

If it is too close, change the .Top or .Left by enough to re-establish your chosen boundary.

Of course you could always include a Click handler that just ignores the fact that the image was clicked...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Move cursor to specific textbox mona_upm84 Excel VBA 3 September 22nd, 2016 10:29 AM
Move cursor to specific textbox mona_upm84 Excel VBA 0 September 29th, 2008 09:35 PM
Move cursor to beginning of field in form Odeh Naber Access 3 June 5th, 2007 04:21 PM
Word-unable to move cursor using mouse. jahid General .NET 0 February 6th, 2007 06:10 AM
how shall I move the cursor? nerssi Javascript 0 September 21st, 2004 09:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.