Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for mousedown API -Top Level Form loses focus
Message
 
À
14/08/2009 02:13:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01418032
Message ID:
01418077
Vues:
50
Tore,
that's exactly what I was thinking. (Of course I need to figure out how to bind it.) I just need the windows API call for the mousedown event.
Thanks.


>I have no turnkey solution for you, but when I read your message, I immediately thought "why not use bindevent, and bind to Windows' native event similar to VFP's MouseDown event"?
>
>>I posted this a few weeks back but was not able to get a fix. I have form 1 that then runs form 2 from a command button. Form 2 is used to change settings on form 1. Form 1 is a modal formset with two forms. Form 2 is a modless top level form. When you click on any control on form 1 the form gets focus and form 2 loses focus. After that, the only way you can get form 2 to have focus is by clicking on the title bar.
>>
>>Form 2 has a pointer to form 1 so that when the user changes a setting in form 2 the change is reflected in form 1. (form 1 code: do form2 with thisform. Thisform is then saved in a property of form 2 and it also sets a property in form 1 with its own Thisform.) Thus each form has a handle on the other. It must be that way so each form can change things in the other as needed.
>>
>>In place of fixing the problem of not being able to set focus on form 2 by clicking it I thought about simply tracking the mouse pointer on the entire windows desktop and if the mouse is over form 2 then simply have some code set focus to it. I found code at new2news.com but what I found only tracks the mouse position and must be run repeatedly in a loop to get the position.
>>
>>Does anyone know the windows API for mouse down anywhere on the windows desktop? I can get the position, I just need the mousedown event to fire off my code.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform