Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WORD automation and busy signals
Message
De
13/01/2001 11:37:31
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
12/01/2001 19:06:51
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00463296
Message ID:
00463389
Vues:
20
Neil,
This is referred in MS KB q240809 and as a workaround :
APPLICATION.OLERequestPendingTimeout = 0
is suggested. However it doesn't work in your case.
This works :
DECLARE integer GetForegroundWindow in WIN32API
DECLARE short IsWindow in WIN32API integer
declare Sleep in win32API integer

** create WORD server
oo = createobject("word.application")
oo.visible = .t.
** maximize WORD
oo.windowstate = 1
oo.activate

gHwndWord = GetForegroundWindow() && Save word window handle

** create wait state to keep WORD on DeskTop
do while IsWindow(gHwndWord) # 0
  =Sleep(1000) && Do nothing for 1 sec
enddo
do returnme
messagebox("You closed WORD")
oo = .null.
release oo
messagebox("Automation Reference Is Gone")

procedure returnme
messagebox("You are in Procedure: Returnme")
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