Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open Word On Top of VFP
Message
De
13/02/2003 06:39:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
12/02/2003 17:39:12
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00752463
Message ID:
00752623
Vues:
13
This message has been marked as the solution to the initial question of the thread.
>Hi Tamar,
> I found BringWindowToTop in MSDN. Do you have an example of how to call it in VFP? How do you get the handle to the Word window? Thanks.
Declare Integer FindWindow In WIN32API String @ lpClass, String @ lpTitle
Declare BringWindowToTop In WIN32API Integer
oWord = Createobject('Word.application')
With oWord
  .Documents.Open(Getfile('DOC'))
  .Visible = .T.
  .Activate && Generally this is sufficient to bring word on top

  m.cDocCaption = .ActiveWindow.Caption
  m.cAppTitle = .Caption
  m.cTitle = m.cDocCaption + ' - ' + m.cAppTitle
Endwith
* Bring VFP to top - Word is on top unless forced to behind
BringWindowToTop(_vfp.HWnd) 
m.hWnd = FindWindow('OpusApp',m.cTitle) && Could use 0 in place of 'OpusApp'
BringWindowToTop(m.hWnd)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform