<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content=text/html;charset=ISO-8859-1>
<META content="MSHTML 6.00.2900.2627" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><SPAN class=140431421-09062005><FONT face=Arial color=#0000ff size=2>I 
agree with Phil, a COM object will be ideal.</FONT></SPAN></DIV>
<DIV><SPAN class=140431421-09062005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=140431421-09062005><FONT face=Arial color=#0000ff 
size=2>Leigh</FONT></SPAN></DIV>
<DIV><SPAN class=140431421-09062005><FONT face=Arial color=#0000ff 
size=2>Cameraman</FONT></SPAN></DIV>
<DIV><SPAN class=140431421-09062005><FONT face=Arial color=#0000ff size=2><A 
href="http://www.salenz.com">http://www.salenz.com</A></FONT></SPAN></DIV>
<DIV><SPAN class=140431421-09062005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> delphi-bounces@ns3.123.co.nz 
  [mailto:delphi-bounces@ns3.123.co.nz]<B>On Behalf Of </B>Phil 
  Middlemiss<BR><B>Sent:</B> Friday, 10 June 2005 8:23 a.m.<BR><B>To:</B> NZ 
  Borland Developers Group - Delphi List<BR><B>Subject:</B> Re: [DUG] Program 
  design question<BR><BR></FONT></DIV>Hi John, what about having the&nbsp; 
  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">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) &lt;= 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 width="90%" SIZE=4>
_______________________________________________
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></BLOCKQUOTE></BODY></HTML>