Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't force MS word window on top
Message
De
01/10/2004 10:29:34
 
 
À
30/09/2004 23:34:57
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00947818
Message ID:
00947936
Vues:
16
Does
oword.application.activate

instead of
oword.activate

make a difference?


>I have am calling word automation from vfp 7. It's a simple application. The user highlights a document name in a grid. The application then opens the word file for editing. I want the word application to be on top of the vfp application.
>
>I've seen posts on here (somewhere from Cetin - I think) indicating that issuing the activate is 'usually sufficient' to bring word on top.
>
>
>The following code brings the word window to the top:
>oad= Thisform.oword.documents.Open(lcNewfileName)
>WAIT clear
>thisform.oword.visible=.t.
>Thisform.oword.Activate()
>
>But the problem is that I want to display a message to the user before I bring word to the top. For some reason, if I insert a messagebox() before calling the activate code, it doesn't bring it to the top????
>
>The following code DOES NOT work:
>oad= Thisform.oword.documents.Open(lcNewfileName)
>WAIT clear
>
>Messagebox('The file ' + lcNewfileName + 'is now available in Microsoft Word for editing' + Chr(13)+Chr(10) + ;
> 'Click OK to begin editing the file',0+64,'Document Management System')
>thisform.oword.visible=.t.
>Thisform.oword.Activate()
>
>Why does the messagebox() have an effect on this. I am stumped. There were some other posts about using the findwindow API. Will I need to resort to using that?
>
>
>
>
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform