|
-
Nov 19th, 2001, 04:18 AM
#1
Thread Starter
Member
Form problem...
Basically, I want a timer event to occur when a form has got focus/activated/clicked etc. Problem is, neither Form_Click, or Form_GotFocus even work. So I’ve tried Form_Activate, and by in large it works except it falls over when another application is opened i.e. the activate event no longer works when the form gets focus again.
Any ideas? :|
-
Nov 19th, 2001, 04:30 AM
#2
Hyperactive Member
i dont know what is your exact need but mousemove event of form may help you. can you make it more clear
and form_activate will work only till the form has focus.
-
Nov 19th, 2001, 04:34 AM
#3
From what I understand you want the timer event to take place everytime the form is displayed. Therefore call it from the form load event.
-
Nov 19th, 2001, 04:37 AM
#4
Thread Starter
Member
I'll take it from the top...
Every 60 mins I want to check if a specific form has focus, if it does then I show a Msgbox stating the number of messages in the user's mailbox. I also give them the option to open up outlook and view the inbox. Now as I said, if I stay within the confinds of my application the activate event works perfectly. The problem is, when somebody decides to open up outlook and then go back to my application the activate event no longer seems to work until other forms are opened and then closed.
I'll try the mousemove event and let you know if it works... ta
Last edited by WuzZ; Nov 19th, 2001 at 04:45 AM.
-
Nov 19th, 2001, 04:45 AM
#5
Thread Starter
Member
The Form_Load event wouldn't work I'm afraid, as the form I'm talking about remains opened at all times until the application is closed.
p.s. the mousemove_event hasn’t worked either 
Thanks anyway
-
Nov 19th, 2001, 04:51 AM
#6
Conquistador
why not use GetForeGround window api?
with a timer?
-
Nov 19th, 2001, 04:57 AM
#7
Thread Starter
Member
-
Nov 19th, 2001, 05:35 AM
#8
Thread Starter
Member
da_silvy,
I compared the return value of the api call with the hWnd value of the form and it works great.
Really appreciated, thx.
-
Nov 19th, 2001, 05:49 AM
#9
Conquistador
no probs
it was just a suggestion, i thought it might be useful to you though
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|