<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi John, what about having the reporting functionality as an ActiveX
Automation Object. Your logging program stays light since it only needs
the interface to it, and you can then communicate in more complex ways
and shut it down when finished without having to guess who started it.<br>
<br>
Phil.<br>
<br>
Alistair George wrote:
<blockquote cite="mid42A89DE4.3000908@xtra.co.nz" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
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>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Delphi mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a>
</pre>
</blockquote>
</body>
</html>