Article View: borland.public.delphi.commandlinetools
Article #273Re: opening the Delphi application with the working file you double-clicked
From: Mike Williams (TeamB)
Date: Thu, 03 Feb 2005 15:36
Date: Thu, 03 Feb 2005 15:36
27 lines
2063 bytes
2063 bytes
Frank Van Overwalle wrote: > Like is customary in Word, Excel and so on, once you double-click a > working document, and Word opens with that particular working file. > > Similarly, I want to open my Delphi Application (fit.exe) with the > file that I double-clicked (eg, test.ft2). The installshield already > takes care of linking the application with the *.ft2 extension, but > how can I tell the program which working file was clicked last? How > can it "read" that filename from Windows? > > Thanks for helping out. When you set up the file association in windows you specify how the program should handle the file. Generally the filename is passed on the command line. For instance, notepad.exe is typically associated with *.TXT files and if you look at the settings for that you'll see something like the following: C:\WINDOWS\system32\NOTEPAD.EXE %1 The name of the file that was launched is passed in place of the %1. Therefore, in your application you just need to open the file passed as ParamStr(1). -- -Mike (TeamB)
Technical Details
Message-ID:
<42024511$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4202421a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: ff8f1,cb1989cda2056a17
X-Google-Attributes: gidff8f1,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Mike Williams (TeamB)" <mlwilliams@gmail.com>
Subject: Re: opening the Delphi application with the working file you double-clicked
Newsgroups: borland.public.delphi.commandlinetools
References: <4202421a@newsgroups.borland.com>
Organization: APS, Inc.
User-Agent: XanaNews/1.17.1.2
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr
p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
NNTP-Posting-Host: 66.107.65.116
Message-ID: <42024511$1@newsgroups.borland.com>
Date: 3 Feb 2005 07:36:49 -0800
X-Trace: newsgroups.borland.com 1107445009 66.107.65.116 (3 Feb 2005 07:36:49 -0800)
Lines: 27
X-Authenticated-User: mwilliams
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail