By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,853 Members | 2,246 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,853 IT Pros & Developers. It's quick & easy.

Checking Mouse Over

Ali Rizwan
100+
P: 927
Hi all,
i want that if my mouse is over the form timer1 enables but when its over on a control or another window (form has not lost focus yet) timer2 enables.

[ VB6 ]

Thanx

>> ALI <<
Jan 8 '08 #1
Share this Question
Share on Google+
2 Replies


Expert 5K+
P: 8,434
By "another window" do you mean other applications, or just other windows within your application?


Maybe the easiest thing would be to have each timer (or a separate one that drives the process) periodically check the global mouse location (via Windows API call) and determine whether it's within your form.
Jan 9 '08 #2

QVeen72
Expert 100+
P: 1,445
Hi,

You can write the code in Control's Mouse Move and Form's DeActivate event for Timer2
and Form's mouse move for Timer1

Regards
Veena
Jan 9 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.