TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ERIC SCHREIBER
from: MICHAEL JOSEPHSON
date: 1997-06-18 12:13:00
subject: Loading associated files

Hello Eric!
11 Jun 97 17:36, Eric Schreiber wrote to All:
 ES> What's got me stymied is how to load a second file into the *same
 ES> instance* of an MDI app. If Word is already running and I double click
 ES> another *.doc file in explorer, that file gets loaded into the
 ES> already-running Word applicition.
 ES> Anyone know how to pull this trick off in Delphi 1/2/3? Preferably 3.
I know basically how it works but unfortunately I don't have any sample code 
to
show how to do it in Delphi.
Basically when the program loads it checks to see if another instance of the
program is already running. If it is then it switches to it and quits. If the
program was passed a document name on the command line and another copy is
running it sends a message via DDE telling the existing copy of the program 
o
open the file before it quits.
Sorry I can't offer any more help but Delphi has components for DDE and
checking for an existing instance isn't hard - this bit I can tell you how to 
do
if you need it.
/\/\ike
... Don't play stupid with me...I'm better at it.
--- FMailX 1.02
---------------
* Origin: Michael's Point in Sunny Whitefield (2:250/102.7)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.