[DUG] Program design question
Alistair George
bigal at xtra.co.nz
Fri Jun 10 07:52:04 NZST 2005
Hi John.
I dislike writing to the registry personally, it gives me a feeling of
discomfort; due to the registry being a critical part of the windows
O/S. However, what does give me a warm fuzzy feeling are ini files (use
inifiles).
>A program design question: whether to put extra functionality into one
>program or several.
>
>
The concept sounds fine. Your monitor program could write the data to an
ini file in the program directory (or wherever), with data exactly as
you need. I would contain the logfile within the inifile, but if the log
is lengthy, at the end, to save scanning through the lot for control
fields. INI files are just as easy, if not easier to write/read than the
registry as well.
Just write the last programs form name to the INIfile for requirement
below. But possibly you mean
|ShellExecute(Handle, Operation, FileName, Params, Folder, ShowCmd)
eg
||*uses* ShellAPI;
...
*if* ShellExecute(Form1.Handle, *nil*,
'c:\windows\general.txt', *nil*, *nil*, SW_SHOW) <= 32 *then*
Application.MessageBox('Couldn''t execute the application',
'Error', MB_ICONEXCLAMATION);
ShellExecute(Form1.Handle, *nil*, 'c:\windows\notepad.exe',
'c:\windows\general.txt', *nil*, SW_SHOWMAXIMIZED);
ShellExecute(Form1.Handle, 'open', 'c:\windows\notepad.exe',
'general.txt', 'c:\windows', SW_SHOWNORMAL);
ShellExecute(Form1.Handle, *nil*, PChar(fname + '.txt'),
*nil*, *nil*, SW_MAXIMIZE);
ShellExecute(Form1.Handle, *nil*, 'c:\windows\notepad.exe',
*nil*, *nil*, SW_SHOWNORMAL);|
Al+
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20050610/94925639/attachment.html
More information about the Delphi
mailing list