<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi John.<br>
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 <span>ini</span>
files (use <span>inifiles</span>).<br>
<blockquote
cite="mid20050609094346.ZZEX7985.pop1-rme.xtra.co.nz@OESERVER"
type="cite">
<pre wrap="">A program design question: whether to put extra functionality into one
program or several.
</pre>
</blockquote>
The concept sounds fine. Your monitor program could write the data to
an <span>ini</span> file in the program directory (or wherever), with
data exactly as you need. I would contain the <span>logfile</span>
within the <span>inifile</span>, but if the log is lengthy, at the
end, to save scanning through the lot for control fields. <span>INI</span>
files are just as easy, if not easier to write/read than the registry
as well.<br>
<br>
Just write the last programs form name to the <span>INIfile</span> for
requirement below. But possibly you mean <br>
<pre class="snippet"><code>ShellExecute(Handle, Operation, FileName, Params, Folder, ShowCmd)
eg
</code><code><b>uses</b> ShellAPI;
...
<b>if</b> ShellExecute(Form1.Handle, <b>nil</b>,
'c:\windows\general.txt', <b>nil</b>, <b>nil</b>, SW_SHOW) <= 32 <b>then</b>
Application.MessageBox('Couldn''t execute the application',
'Error', MB_ICONEXCLAMATION);
ShellExecute(Form1.Handle, <b>nil</b>, 'c:\windows\notepad.exe',
'c:\windows\general.txt', <b>nil</b>, SW_SHOWMAXIMIZED);
ShellExecute(Form1.Handle, 'open', 'c:\windows\notepad.exe',
'general.txt', 'c:\windows', SW_SHOWNORMAL);
ShellExecute(Form1.Handle, <b>nil</b>, PChar(fname + '.txt'),
<b>nil</b>, <b>nil</b>, SW_MAXIMIZE);
ShellExecute(Form1.Handle, <b>nil</b>, 'c:\windows\notepad.exe',
<b>nil</b>, <b>nil</b>, SW_SHOWNORMAL);</code>
</pre>
Al+
<blockquote
cite="mid20050609094346.ZZEX7985.pop1-rme.xtra.co.nz@OESERVER"
type="cite">
<pre wrap="">
</pre>
</blockquote>
</body>
</html>