Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting When a Word Object no longer exists
Message
From
06/03/1998 03:42:06
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/03/1998 18:01:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00082838
Message ID:
00082905
Views:
30
>I have a Word 97 (Word.application) object that I have programatically created which opens a file in Word97. How can I have VFP keep running in a loop until the user closes/exits Word97.
>
>In other words, how can I tell when the Word97 object no longer exists.
* oWord.filenewdefault
* Some code
do while findWindowHandle("Microsoft Word - Document1")<>0
enddo
? "Word exited"
* Unfortunately you need exact win title (don't know another way)

FUNCTION findWindowHandle()
lparameter tcWinTitle

DECLARE integer FindWindow in WIN32API string cNull, string cWinName
return FindWindow(0,tcWintitle)

ENDFUNC
Maybe a timer event could also control ?
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
Previous
Reply
Map
View

Click here to load this message in the networking platform