[DUG] Program design question
Leigh Wanstead
leighw at softtech.co.nz
Fri Jun 10 09:15:44 NZST 2005
I agree with Phil, a COM object will be ideal.
Leigh
Cameraman
http://www.salenz.com
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz]On
Behalf Of Phil Middlemiss
Sent: Friday, 10 June 2005 8:23 a.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Program design question
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.
Phil.
Alistair George wrote:
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+
--------------------------------------------------------------------------
--
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20050610/8c67c03a/attachment-0001.html
More information about the Delphi
mailing list