| Author |
Message |
Terry W. Dotson
Guest
|
Posted:
Fri Apr 01, 2005 8:19 pm Post subject:
Re: Got Focus Event for Modeless forms using AcFocusCtrl |
|
|
Mike Tuersley wrote:
| Quote: | There is a way around it but it might require a lot of time for you.
Switch your app to a .net assembly. You can then use a custom tool
palette in 2k5-2k6 which has plenty of events.
|
Thats on the to-do list, but was hoping to eak out one last project that
would be 2002/2004 compatible also.
Thanks, Terry
Terry
|
|
| Back to top |
|
 |
GTVic
Guest
|
Posted:
Sat Apr 02, 2005 2:08 am Post subject:
Re: Got Focus Event for Modeless forms using AcFocusCtrl |
|
|
| An accurate statement - it doesn't have the property. You need a workaround API call to get the value. |
|
| Back to top |
|
 |
GTVic
Guest
|
Posted:
Sun Apr 03, 2005 12:58 pm Post subject:
Re: Got Focus Event for Modeless forms using AcFocusCtrl |
|
|
I have a solution that is fairly simple, uses a few API calls and a callback function to intercept windows messages.
The only problem is that it hangs occasionally. I'm not sure why. When it hangs I usually hit Ctrl-Break and go to debug mode and then F5 to continue.
Maybe this solution is not too compatible with VBA or maybe someone can suggest an improvement.
The idea came from here:
http://www.developerfusion.com/show/49/2/
|
|
| Back to top |
|
 |
Terry W. Dotson
Guest
|
Posted:
Sun Apr 03, 2005 5:34 pm Post subject:
Re: Got Focus Event for Modeless forms using AcFocusCtrl |
|
|
GTVic wrote:
| Quote: | The only problem is that it hangs occasionally.
|
Looks dangerous. I'd rather use a refresh button than introduce
instability.
Thanks, Terry |
|
| Back to top |
|
 |
GTVic
Guest
|
Posted:
Mon Apr 04, 2005 1:02 am Post subject:
Re: Got Focus Event for Modeless forms using AcFocusCtrl |
|
|
Well, the code is very simple so maybe the solution is simple. I am curious to know if you tried it and saw what I was talking about.
I think the instability only comes when you click on the titlebar to activate the form. So if the reason for that can be determined you would have an excellent solution.
Also, its possible that expanding the subclassing procedure could be used to completely replace the AcFocusCtrl16.dll component. |
|
| Back to top |
|
 |
|
|
|
|