Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Command buttons in a form with a browser in it
Message
De
21/10/2012 18:52:55
 
 
À
20/10/2012 17:17:28
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01555394
Message ID:
01555419
Vues:
52
Update

Still stuck with the right button mouse click thing (!).

Using the alternate method of Craig's example (just to check if everything else was ok), put the code below in the click event of a command button::
oDoc = ThisForm.oleBrowserWin.object.Document
oDoc.Focus()                                        && document must have focus
WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys("^f")
It worked and openned the search dialog.

So, I decided to use this method, because it seemed (to me) more straightforward. Searching in the internet, found elsewhere that the right button mouse click could be simulated with SHIFT+F10 (tested by hand in the browser window and it worked).

Looking at http://msdn.microsoft.com/en-us/library/8c6yea83%28v=vs.84%29.aspx, learned that "SHIFT" is represented by "+", "CTRL" by "^" and "ALT" by "%". The special keys, should be between braces: {ENTER}, {NUMLOCK}, {PGDN}, {F1} etc.

That's fine, because in Craig's example he wanted a "CTRL+F" and he wrote:
WshShell.SendKeys("^f")
In my case as I wanted SHIFT+F10, so I wrote:
WshShell.SendKeys("+{F10}")
Result? Nothing hapenned. Very disapointing.

I wonder, what am I doing wrong?

Fernando

PS. As a test, I also tried:
WshShell.SendKeys("^p")
instead of
ThisForm.oleBrowserWin.ExecWB(6, 1)
and it openned the print dialog, just fine.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform