RE: [DUG]: GetLastError

1999-02-08 Thread John Christenhusz

Hi Rohit,
I use the unit DosErrorMsg.pas, and just say:
stDosErrorMsgs[iDosErrorNumber]
See attached file.


Cheers,


John Christenhusz 
POSTEC DATA SYSTEMS Ltd. 
PO Box 302-230 
Auckland, New Zealand 
E-mail: [EMAIL PROTECTED] 
Phone: 09-415.8803 
Fax: 09-415.9042 



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 11, 1998 1:58 PM
 To: Multiple recipients of list delphi
 Subject: [DUG]: GetLastError


 After having got the last error, how do I retrive the string
 description. I have done a search for possible candidates but cant
 seem to find the function.

 Rohit

 ==
 CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand
 PH (649) 489-2280
 FX (649) 489-2290
 email [EMAIL PROTECTED] or [EMAIL PROTECTED]
 ==
 --
 -
 New Zealand Delphi Users group - Delphi List -
 [EMAIL PROTECTED]
 Website: http://www.delphi.org.nz
 



 DosErrorMsg.pas


RE: [DUG]: Filter Date/Time

1999-02-17 Thread John Christenhusz

Hi Tony Goodrich,

I'm not sure what you mean here, but HOW do I specify the filter?

"table.filter := DateTime = ."

John

 -Original Message-
 From: Tony Goodrich [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 18, 1999 4:12 AM
 To: Multiple recipients of list delphi
 Subject: Re: [DUG]: Filter Date/Time
 
 
 You may have to filter based on a date/time range becasue a 
 date/time is an
 exact (to 1 sec) match so you need to run frmm midnight to midnight.
 
 
 -Original Message-----
 From: John Christenhusz [EMAIL PROTECTED]
 To: Multiple recipients of list delphi [EMAIL PROTECTED]
 Date: Wednesday, 17 February 1999 13:08
 Subject: [DUG]: Filter Date/Time
 
 
 Hi all,
 
 How can you filter a table on a field type Date, Time or DateTime.
 
 With an SQL you can say:
 
 sql.add(., where "Date" = :MyDate)
 paramByName('MyDate').asDate := now;
 
 
 Is there anything similar for defining a table-filter property on a
 date/time-field?
 
 
 
 Thanks,
 
 John Christenhusz
 POSTEC DATA SYSTEMS Ltd.
 PO Box 302-230
 Auckland, New Zealand
 E-mail: [EMAIL PROTECTED]
 Phone: 09-415.8803
 Fax: 09-415.9042
 
 
 
 
 --
 -
 New Zealand Delphi Users group - Delphi List - 
 [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



[DUG]: Cloning a table

1999-03-31 Thread John Christenhusz

Hi all,

I'm trying to create a clone table at run-time and use the following
code. It creates the clone table all right, but it doesn't create the
index with it.

Any ideas?

Ps. This routine creates only the assigned index (supposing it works).
Is there a way to create ALL indexes without having to specify which you
want?

Thanks for your help.



function CreateCloneTable(sDbaseName, sSourceTableName, sDestTableName,
sIndexName : string; vtTableContent : tTableContent) : boolean;
{Function:
   Create a copy of the source table in the destination table (including
any indexes etc.
 Entry Parameters:
   sDbaseName   = name of dbase
   sSourceTableName = source table name
   sDestTableName   = destination table name
   sIndexName   = name of secondary index to create
   vtTableContent   = defines empty table or copy data
 Returns:
   True if completed successfully.}
var
   tblSource : TTable;
 tblDest   : TTable;
   bmBatchMove : TBatchMove;
begin
   result := true;
   try
  tblSource := TTable.create(nil);
  tblDest   := TTable.create(nil);

  with tblSource do
  begin
 databaseName := sDBaseName;
 tableName:= sSourceTableName;
 IndexName:= sIndexName;
  end;

  with tblDest do
  begin
 databaseName := sDbaseName;
 tableName:= sDestTableName;
 IndexName:= sIndexName;
  end;

  with tblDest do
  try
 close;
 tblSource.fieldDefs.update;
 fieldDefs.assign(tblSource.fieldDefs);
 tblSource.IndexDefs.update;
 indexDefs.assign(tblSource.indexDefs);
 createTable; // create the clone table

 // copy data to the new table if required
 if vtTableContent = tCopyData then
 begin
bmBatchMove := TBatchMove.create(nil);
with bmBatchmove do
begin
   source  := tblSource;
   destination := tblDest;
   mode:= batAppend;
   execute;
end;
bmBatchMove.free;
 end;
  except
 result := false;
  end;
  tblSource.free;
  tblDest.free;
   except
  result := false;
   end;
end;{CreateCloneTable}


John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042



 application/ms-tnef


RE: [DUG]: Disable action on re-enabled controls - 2

1999-04-09 Thread John Christenhusz

Hi Alistair,

U wrote:

 You can use the OnKeyUp event of the editor to trap 
 keystrokes, or use a
 keyboard hook.  For the mouse events, a mouse hook works well 
 EG for a menu
 item you would trap the onclick event and nil it.


How can I set a mouse hook?

John.


  I have a form with a number of controls, like buttons, dropdown
  listboxes and tabs.
  At the click of a button a process is started taking some 
 time. Before
  activating the task I disable a number of controls on the 
 form, like the
  dropdown listbox and tabs.
  This works all fine, when I click one of the disabled controls they
  don't work: Yoo-hoo, just what I want!
  But snip after the task is completed and I re-enable the 
 controls, the
  last clicked (disabled) control gets activated (e.g. tab changes or
  dropdown listbox drops its list.
 
  Is there any way to flush that (last) click event before 
 re-enabling the
  controls, or any other solution?
 
  Thanks very much for your help.
 
  John Christenhusz
  POSTEC DATA SYSTEMS Ltd.
  PO Box 302-230
  Auckland, New Zealand
  E-mail: [EMAIL PROTECTED]
  Phone: 09-415.8803
  Fax: 09-415.9042
 
 
 
 
 --
 -
 New Zealand Delphi Users group - Delphi List - 
 [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



[DUG]: Application Return Code

1999-06-07 Thread John Christenhusz

Hi folks,

Can anybody tell me how to get an application to return a (DOS) Return
Code (number) ?
E.g. when a sub-application can't find a file, it should pass on the DOS
Return Code (2) back to the main-program. But also when it fails of any
sub-application specific issue, it should return its own error code
(e.g. from number 1000 onwards).

Thanks very much,

John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042



 application/ms-tnef


[DUG]: Application Return Code - 2

1999-06-07 Thread John Christenhusz

Hi folks,

It may look like an easy one, but it isn't.

My original question was:

Can anybody tell me how to get an application to return a (DOS) Return
Code (number) ?
E.g. when a sub-application can't find a file, it should pass on the DOS
Return Code (2) back to the main-program. But also when it fails of any
sub-application specific issue, it should return its own error code
(e.g. from number 1000 onwards).

One of the reply was 
 Halt(x)

According to the help on Halt() it should work, but it doesn't. I've
included the code that I use to run the EXE.
I suppose it is not 100%.

Thank for any comment.

John Christenhusz.

function ProcessExecute(sCommandLine, sParams: string; vtRunMode:
tRunMode; vtStartMode : tStartMode): integer;
{Function:
 Launch application by path\name using optional parameters.
 This method encapsulates the call to CreateProcess()
 Calling program is suspended till:
 if vtRunMode = tWaitTillFinished : till after task is completed,
 if vtRunMode = tReturnAfterStart : till after initialization is
completed,
 with a max of 10 seconds.
Entry parameters:
 sCommandLine : command line,
 sParams : list of parameters,
 vtRunMode : tWaitTillFinished or tReturnAfterStart.
 vtStartMode : minimised or normal
Returns:
 0 if successful,
 DOS error code if unsuccessful }
var
 vtStartUpInfo : TStartUpInfo; // help available under StartUpInfo
 vtProcessInfo : TProcessInformation; // help available under
PROCESS_INFORMATION
 pCommandLine : array[0..255] of char;
 pParams : array[0..255] of char;
begin
 if fileExists(sCommandLine) then
 begin
 { Clear the vtStartUpInfo structure }
 fillChar(vtStartUpInfo, SizeOf(TStartupInfo), 0);
 with vtStartUpInfo do
 begin
 cb := SizeOf(TStartupInfo); // Specify size of structure
 dwFlags := STARTF_USESHOWWINDOW or STARTF_FORCEONFEEDBACK;
 wShowWindow := SW_SHOWDEFAULT;
 case vtStartMode of
 tNormal : wShowWindow := sw_ShowNormal;
 tMinimised : wShowWindow := SW_ShowMinNoActive;
 end;
 end;

 { Create the process by calling CreateProcess(). Detailed information
 is provided in the Win32 online help for the TProcessInfo structure
 under PROCESS_INFORMATION.}
 strPCopy(pCommandLine, sCommandLine);
 strPCopy(pParams, sCommandLine + ' ' + sParams);

 application.processMessages;
 if createProcess(pCommandLine,
 pParams,
 nil,
 nil,
 false,
 NORMAL_PRIORITY_CLASS or NORMAL_PRIORITY_CLASS,
 nil,
 nil,
 vtStartUpInfo,
 vtProcessInfo) then
 with vtProcessInfo do
 begin
 if vtRunMode = tWaitTillFinished then
 while waitForInputIdle(hProcess, INFINITE) = 0 do
 application.processMessages
 else
 waitForInputIdle(hProcess, 1); // wait until initialized (max 10
seconds)

 if waitForInputIdle(hProcess, INFINITE)  -1 then
 result := 0 // set to zero, meaning successful run
 else
 result := getLastError; // get error number from called EXE

 closeHandle(hThread); // free the hThread handle
 closeHandle(hProcess); // free the hProcess handle
 end
 else
 result := getLastError; // Set result to the error code.
 end
 else
 result := 2; // file not found
end;{ProcessExecute} 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



RE: [DUG]: Getting the Working directory?

1999-06-10 Thread John Christenhusz

Try GetCurrentDir

John Christenhusz

 -Original Message-
 From: Sean Cross [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 10, 1999 4:55 PM
 To: Multiple recipients of list delphi
 Subject: [DUG]: Getting the Working directory?
 
 
 Does anyone know how to get the working directory of a application (as
 opposed to the application directory)?
 
 thanks
 
 Sean
 
 --
 -
 New Zealand Delphi Users group - Delphi List - 
 [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



[DUG]: ReportPrinter problem

1999-07-14 Thread John Christenhusz

Hi all,

This is a problem I have with ReportPrinter v3.

I have this problem since I had to change a single table field (Temp)
from the type integer into the type number (a Paradox float). Doing this
changed all data (previously shown correctly) into the text (invalid).
See examples below.

This is how it used to look like (no decimal on the temp value):

Product CapacityTempStock
Diesel  123456  23.0123456


This is how should look like (decimal 5 on the temp value):

Product CapacityTempStock
Diesel  123456  23.5123456


But this is what I get:

Product CapacityTempStock
(invalid)   (invalid)   (invalid)   (invalid)



Has anybody got any idea what's going on.

Thanks very much for your help.

John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042



 application/ms-tnef


[DUG]: Delphi upgrades

1999-09-15 Thread John Christenhusz

Hi folks,

Everybody wonders if D5 will better than D4, better than D3, better than D2
etc. and if it will have such and such (long wanted and long waited) new
features or not.

I wonder, is there any formal means of letting Inprise know about our
"wanted features and enhancements" so they can implement any of that in
their new version (perhaps stream-lined via Inprise NZ?).

I'm sure Inprise will be interested to know how their customers think about
their product and how to improve it.


Regards,

John Christenhusz.

 application/ms-tnef


RE: [DUG]: Sampling sound

1999-09-23 Thread John Christenhusz

Hi Sean,

I would advice to buy a Counter/Timer board DT2819 and for you analogue data
acquisition the Analogue Input board DT2814, both from Data Translation (see
www.datatranslation.com).

Alternatively the acceleration can be measured by "tapping" the
speedometer's pulses by sticking a hall generator at the back of it (right
next to the cable going in) As you may know it rotates a magnet to displace
the needle. This hall generator (connected up to a small amplifier, any
op-amp will do) will generate pulses proportional with the speed. From this
you can calculate its acceleration. By doing it this way you won't need the
Analogue Input board.

Cheers,

John Christenhusz


 -Original Message-
 From: Sean Cross [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 23, 1999 5:57 PM
 To: Multiple recipients of list delphi
 Subject: RE: [DUG]: Sampling sound
 
 
 I am wanting to read spark plug pulses so i can calculate rpm 
 (and then add
 in accelration measured by a g sensor).
 
 The easiest way of doing this is via the microphone jack.  
 Then I can find
 the peaks and do something with the information.  I could just record
 everything into a buffer and look for the peaks in semi real 
 time but I need
 to be able to syncronise the data with other infomation (eg G sensor).
 
 How often I need to sample (and what the best process is) is 
 something that
 will require experimentation.
 
 All help gratefully appreciated.
 
 Sean
 
  -Original Message-
  From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]]On
  Behalf Of Alistair George
  Sent: Thursday, 23 September 1999 08:24
  To: Multiple recipients of list delphi
  Subject: [DUG]: Sampling sound
 
 
   does anyone have any ideas/pointers on sampling sound.  I 
 don't want to
   actually record sound, rather I want to get samples 100-200
  times a second
   and then act on them immediately.
  Depends a bit on what you want to do.
  If you want the peaks I think the term is quantasize or similar.
  There is a
  WAV file 'normalizer' which is freeware which works on reducing or
  increasing the overall level of the parsed WAV file for
  consistent recording
  levels. I am seeking the source code for this and if thats 
 what you are
  after let me know off the list.
  Otherwise, if you want to look at millisecond 'frames' thats
  another story.
  There are several audio codes which demonstrate that as in VU
  meters. If you
  need ask me and I will send to you.
  Alistair+
 
  --
  -
  New Zealand Delphi Users group - Delphi List - 
 [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
 
 
 --
 -
 New Zealand Delphi Users group - Delphi List - 
 [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



[DUG]: TDBGrid component's dgMultiSelect

1999-10-14 Thread John Christenhusz

Hi all,

The TDBGrid component has the property dgMultiSelect, obviously to select
multiple items.

How can I process the selected items at all?

Thanks,


John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042



 application/ms-tnef


[DUG]: TGraphicsServer

1999-10-18 Thread John Christenhusz

Hi all,

Has anybody the help file for TGraphicsServer (named CTRLREF.HLP) ?

Or can anybody suggest any other powerful graphics component?

Thanks,

John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042



 application/ms-tnef


[DUG]: Language Package

1999-10-21 Thread John Christenhusz

Hi all,

We are using the Lingscape MultLang 2  translation package and are having
endless problems with it.  To top it all off, LINGSCAPE DON'T REPLY TO OUR
EMAILS REQUESTING HELP ANYMORE!

I would suggest caution if looking at using this package.

Anyway, has anyone dealt with this software for Chinese BIG5 translation?
Have anyone had problems when using the Language Workshop to do the actual
translation?  We are finding that it is adding random characters and
question marks to the translation after each phrase or word is posted to the
translation table.

Any suggestions would be appreciated. Or does anybody have experience with
any alternative Language package?


John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042



 application/ms-tnef


RE: [DUG]: Language Package

1999-10-21 Thread John Christenhusz

Is it any good?
What does it cost?
Who's the supplier?

John Christenhusz.

 -Original Message-
 From: Neil Anderson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, October 22, 1999 2:48 PM
 To: Multiple recipients of list delphi
 Subject: RE: [DUG]: Language Package
 
 
 We use multilizer for Spanish translations
 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



RE: [DUG]: Dos Error Codes

1999-11-03 Thread John Christenhusz

Hi Grant,

I use the (home made) unit attached. It includes the DOS error messages up
to number 106.
To use it, include the unit and do something like:

sErrorMessage := stDosErrorMsgs[iDosError];


Cheers,

John Christenhusz


 -Original Message-
 From: Grant Black [mailto:[EMAIL PROTECTED]]
 
 
 I have a client reporting 'I/O Error 105' on a Delphi 1 app 
 of ours.  I
 assume it is something like writing to a file to a read-only 
 device but
 I can't seem to find out what this code means in the help or 
 the Borland
  MS sites - they just list the Win32 error codes which don't apply in
 this case.
  
 Any ideas?


 DosErrorMsg.pas


RE: [DUG]: [Q] Showing a hint manually....

1999-01-02 Thread John Christenhusz

How about setting the component's property ShowHint to True or False.

John Christenhusz.

 -Original Message-
 From: Donovan J. Edye [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 05, 1999 12:02 PM
 To: Multiple recipients of list delphi
 Subject: [DUG]: [Q] Showing a hint manually
 
 
 G'Day All,
 
 Can someone tell me how to show a hint manually. I could do 
 it the hard way
 by creating a THintWindow myself but I figured that I could send it a
 Button2.Perform(CM_HINTSHOW, 0, Button1.Handle) but this does 
 not appear to
 work. Anyone got some suggestions??
 
 TIA
 
 --
 --
 --Donovan
 Donovan J. Edye [www.edye.wattle.id.au]
 Namadgi Systems, Delphi Developer
 Web: www.namsys.com.au E-Mail: [EMAIL PROTECTED]
 Voice: +61 2 6285-3460 Fax: +61 2 6285-3459
 TVisualBasic = Class(None);
 --
 --
 
 --
 -
 New Zealand Delphi Users group - Delphi List - 
 [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



RE: [DUG]: Index out of Date

1999-11-24 Thread John Christenhusz

Hi Eion,

Have a look at http://www.delumpa.com/tips/db/db02.htm

Cheers,
John Christenhusz


 -Original Message-
 From: Eion McIntosh (CHCH) [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 25, 1999 12:53 PM
 To: Multiple recipients of list delphi
 Subject: [DUG]: Index out of Date
 
 
 Hi
 
 Has anyone come across the 'Index out of date' error message.
 One of my applications is currently getting this message periodically
 and the only way around it is to copy all the records into an empty
 database.
 No other applications we have have done this.
 
 Borland's FAQ site mentions this error in Paradox Tables on NT and
 mentions opportunistic locking and mentions making some new registry
 settings but we are getting this on an 95 machine with a Dbase table.
 
 Any ideas?
 
 Eion
 --
 -
 New Zealand Delphi Users group - Delphi List - 
 [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



RE: [DUG]: Good deal

1999-12-14 Thread John Christenhusz

 I can highly reccomment it.  It's excellent.. for proping up 
 my monitor and
 as a door stop.  For anything else, it's utter crap.


Dear Peter Jones,

Haven't you got any sense at all, can't you be a little bit more
constructive ?

Otherwise keep your big mouth shut!


John Christenhusz.


 - Original Message -
 From: Matt Powell [EMAIL PROTECTED]
 To: Multiple recipients of list delphi [EMAIL PROTECTED]
 Sent: Monday, December 13, 1999 7:03 PM
 Subject: [DUG]: Good deal
 
 
  If you're in Christchurch (like me), you might want to check
  out East's Bookshop in High Street. They've got a book 
 called "Delphi 3
  Superbible" (Waite Group Press, 1996) for $11.95. I know D3 
 seems like
 ages
  ago now, but it's still 1310 pages of very useful info on 
 the VCL - and a
  CD-ROM!
 
  - Matt
 
 
  
 --
 
 -
  New Zealand Delphi Users group - Delphi List - 
 [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
 
 --
 -
 New Zealand Delphi Users group - Delphi List - 
 [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



RE: [DUG]: BP7

2000-02-02 Thread John Christenhusz

error 200 = "Division By Zero"


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 03, 2000 11:24 AM
 To: Multiple recipients of list delphi
 Subject: [DUG]: BP7
 
 
 Does anyone remember the runtime 200 error on fast PCs.  Ever 
 since the patch and replaement of TURBO.TPL, I have been having 
 wierd errors on the apps.  I came across another patch that claims 
 this original one distributed v7.00 TPLs. aaarrggh.
 
 My original disks are history, courtesy of house fire.  Can anyone 
 email me TURBO.TPL if it has 7.01 timestamp please.
 
 Rohit
 
 ==
 CFL - Computer Fanatics Ltd.  21 Barry's Point Road, AKL, New Zealand
 PH(649) 489-2280 
 FX(649) 489-2290
 email [EMAIL PROTECTED]  or  [EMAIL PROTECTED]
 ==
 
 --
 -
 New Zealand Delphi Users group - Delphi List - 
 [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



[DUG]: tPageControl

2000-02-06 Thread John Christenhusz

Hi folks,

How can I change the tab order on a TPageControl component. I was hoping to
find a property named e.g. "Pages" similar to the TTabbedNotebook (Win31)
allowing you to add/remove/order the tabs.

Thanks for your help.

John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042



 application/ms-tnef


[DUG]: Installation problem

2000-02-27 Thread John Christenhusz

Hi all,

Installing D4 on my PC fails. It comes with the error message:

"Error -113 while copy files. Could not find "RunImage" directory. "

Any had this before, any ideas why and how to solve this problem?

Thanks very much in advance.

John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042



 application/ms-tnef


[DUG]: AVI component - 2

2000-02-16 Thread John Christenhusz

Hi all,

Follow-up of my previous question this morning:

Yes, obviously I can use TAnimate, but the point is that it doesn't seem to
load an AVI file with a size of 1,059 Kbytes.
Is there a limit (apparently there is)?

Making it a GIF file reduces the resolution dramatically and is no good
alternative (this using TRxGIFAnimator).
Any other alternatives?

TIA

John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042



 application/ms-tnef


[DUG] AVI - TMediaPlayer

2000-02-17 Thread John Christenhusz

Thanks for the advice to use the TMediaPlayer to run an AVI.
But, how can I control the size of the AVI. When I set the TMediaPlayer's
property Display to e.g. a panel then it shows the AVI at a reduced size.
How can I make it so that it stretches the AVI to fit the panel?

TIA

John Christenhusz
POSTEC DATA SYSTEMS Ltd.
PO Box 302-230
Auckland, New Zealand
E-mail: [EMAIL PROTECTED]
Phone: 09-415.8803
Fax: 09-415.9042



 application/ms-tnef


RE: [DUG] AVI - TMediaPlayer - 2

2000-02-17 Thread John Christenhusz

Hi folks,

I've found the solution to run the AVI properly at any required size. I'm
using a second form with a Tpanel on it (aligned to client) and the code
below does the rest.
The only remaining problem is now, that when I resize the AVI form during or
after the run, the AVI gets wiped totally! Also when I move any other window
partially over the AVI it wipes that area.

Any ideas / suggestions.

Thanks very much,

John Christenhusz.

procedure TformControl.btnStartClick(Sender: TObject);
begin
  with MediaPlayer do
  begin
 formAVI.show;
 display := formAVI.pnAVI;
 open;
 displayRect := formAVI.clientRect;
 play;
  end;
end;


  -Original Message-
 Thanks for the advice to use the TMediaPlayer to run an AVI.
 But, how can I control the size of the AVI. When I set the 
 TMediaPlayer's property Display to e.g. a panel then it shows 
 the AVI at a reduced size. How can I make it so that it 
 stretches the AVI to fit the panel?

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



[DUG]: AVI - 3

2000-02-27 Thread John Christenhusz

Hi Darren,

No, unfortunately I have not found any solution for this problem yet. I'll
let you know if I have.

For the sake of any other interested readers, this was my question:


I run an AVI, using TMediaPlayer having Display assigned to a panel.
This works fine, but does anybody have any idea why the AVI gets deleted
when I go over it with any other window? It wipes it like an erase rubber.

Cheers,

John Christenhusz.


 -Original Message-
 From: Darren J Gilbertson [ mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ]
 Sent: Monday, February 28, 2000 9:24 AM
 To: [EMAIL PROTECTED]
 Subject: AVI - 3


 Hi John,

 I am a member of Delphi Users Group and have a similar
 problem with AVI's
 erasing.  Have you resolved the problem yet, if so can you
 please let me
 know.


 Darren Gilbertson
 Civil Engineer
 


 application/ms-tnef


[DUG]: Installation problem

2000-03-08 Thread John Christenhusz
Title: 



Hi folks,I (still) 
have this problem installing D4 on my PC. The following happens:
After the interactive session (asking: what, where, 
serial#  authorization key, etc.) it starts copying files andcomes up 
(at 0%) with the following message:

  Error copying files.Unknown 
  errorError code: -1Source file: *.cnfDestination file: 
  nothing quoted here
Then when I continue, it comes up (at 8%) with 
following message:

  -113 error while copying files.Could 
  not find "RunImage" directoryCopy Install dir  
  RunImage...Must CD root mapped to a drive 
letter.
Hereafter it gives up and the installation process is 
terminated.
Has anybody any ideas?
Is there any way of passing this question to the 
Borland technicians?
Your help is highly appreciated.
John Christenhusz POSTEC DATA SYSTEMS Ltd. PO Box 302-230 Auckland, New Zealand E-mail: [EMAIL PROTECTED] Phone: 09-415.8803 Fax: 09-415.9042 


RE: [DUG]: Installation problem - 2

2000-03-09 Thread John Christenhusz
Title: 



Hi all,Thanks for the reply all of you.I 
have copied, from the CD, the INSTALL and RUNIMAGE directories onto my HD (to a 
directory called c:\Delphi4).ThenI ran 
SETUP.EXE located in the INSTALL directory. This setup procedure works fine in 
principle, running through the interactive session 
(indicating that it is not a hardware related problem I presume).However 
it again failed the installation and comes up with that same 
error message (as reprinted below).
The second error message (-113) talks aboutspecifying 
the drive letter. How am I suppose to specify the drive letter? I run SETUP.EXE 
from the Start-Menu's RUN command: "c:\Delphi4\Install\SETUP.EXE".
Has anybody any ideas how to solve this (urgent) 
problem?
Note: I have re-installed Delphi 2 (from the CD) without any 
problems.
Your help is highly appreciated.
John Christenhusz.
Error Message:After the interactive session (asking: what, where, serial#  
authorization key, etc.) it starts copying files andcomes up (at 0%) with 
the following message:

  Error copying files.Unknown 
  errorError code: -1Source file: *.cnfDestination file: 
  nothing quoted here
Then when I continue, it comes up (at 8%) with 
following message:

  -113 error while copying files.Could 
  not find "RunImage" directoryCopy Install dir  
  RunImage...Must CD root mapped to a drive 
letter.
Hereafter it gives up and the installation process 
is terminated.



[DUG]: Lotus

2000-04-06 Thread John Christenhusz

Hi all,

How can I import a Lotus spreadsheet file into a Paradox table?

Thanks for any help.

John Christenhusz
C/- Post Office
PUHOI - 1240
Phone:  09-422.0601
Mobile: 021-johnch (021-564624)
E-mail: [EMAIL PROTECTED]



 winmail.dat


[DUG]: Lotus File Structure

2000-04-10 Thread John Christenhusz

Hi all,

How can I read a Lotus123 file. 

That is to say, what is the file structure ?
- What conversions do I need to do and what is the header record etc. ?
- What file type do I have to declare (file of char?) and what are the field
and record delimiters?

Has anybody any code for me please?

Thanks very much for any help.

John Christenhusz
C/- Post Office
PUHOI - 1240
Phone:  09-422.0601
Mobile: 021-johnch (021-564624)
E-mail: [EMAIL PROTECTED]



 winmail.dat


[DUG]: TwwDBGrid

2000-05-18 Thread John Christenhusz

Hi all,

Is there any way of enlarging the size of a grid in a TwwDBGrid. This to
allow multiple lines for a 100 character field cell.
I can do this at design-time or at run time, but when the associated table
is closed and opened again, the cell size is back to a single line and 100
characters long.


Thanks for any help.

John Christenhusz
C/- Post Office
PUHOI - 1240
Phone:  09-422.0601
Mobile: 021-johnch (021-564624)
E-mail: [EMAIL PROTECTED]



 winmail.dat


[DUG]: InfoPower - wwDBLookupCombo

2000-08-15 Thread John Christenhusz

Hi all,

How to get the wwDBLookupCombo working properly?

I have 2 tables: tblClient  tblCity and their dataSources dsClient  dsCity

tblClient has fields:
Name: string
City: Integer

tblCity has fields: 
Index: autoIncrement
Name: String

wwDBLookupCombo:
dataSource = dsClient
dataField = City
LookupTable = tblCity
LookupField = Index
Selected = City
ShowMatchText = True
Style = csDropDown

The wwDBLookupCombo shows a city and I can change a city. But wat doesn't
work is
- the ShowMatchText and
- add a new city to the table

What is the problem


Thanks very much for any help.

John Christenhusz


 winmail.dat


RE: [DUG]: InfoPower - wwDBLookupCombo

2000-08-16 Thread John Christenhusz

Hi Ian,

What do you mean with "then set the combo index to byCity". The combo hasn't
got an index property.

TIA

John.

 Hi John I think what you need is a case Insensitive Index on the
 City field then set the combo index to byCity
 as to the add new one use the Not tin list event of the combo to do
 stuff but You mignt need to change the Style to csDropdown list I
 think, cant rember exactly

 Ian
 
  Hi all,
 
  How to get the wwDBLookupCombo working properly?
 
  I have 2 tables: tblClient  tblCity and their dataSources
 dsClient  dsCity
 
  tblClient has fields:

  ShowMatchText = True
  Style = csDropDown
 
  The wwDBLookupCombo shows a city and I can change a city. But
 wat doesn't
  work is
  - the ShowMatchText and
  - add a new city to the table
 
  What is the problem
 
 
  Thanks very much for any help.
 
  John Christenhusz

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz



[DUG]: QuickReport

2000-08-27 Thread John Christenhusz

Hi folks,

I've got the following problem with Quickreport in D4, using a very simple
report (just one textlabel on it):

When the QR-form is created from the project-file it works fine, but when I
create the form at run-time, using the following code, then it causes an
Access Violation error when closing the pre-view.
But strangely enough this happens only after I have clicked the printer
setup window from the preview screen (and closing it without any changes).

The code launching the report is as follows:

begin
Application.CreateForm(TForm2, Form2);
with form2 do
begin
  QuickRep1.preview;
  free;
end;
end;

Any help is highly appreciated.


John Christenhusz

 winmail.dat


[DUG]: Quick report

2000-09-12 Thread John Christenhusz

G'day folks,

Can anybody tell me how to get an image dynamically loaded onto the form.

I have a TQRImage and I want to change the bitmap on the fly.
the instruction loadFromFile('xx') is unknown with this component.

Any ideas???

Thanks very much for any help.

John Christenhusz
Pacific Data Systems
C/- Post Office
PUHOI - 1240
Phone:  09-422.0601
Mobile: 021-johnch (021-564624)
E-mail: [EMAIL PROTECTED]

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



[DUG]: Ignore - test

2000-10-24 Thread John Christenhusz

Please ignore this test.

GLOBAL ECOMEX Ltd.
John

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



[DUG]: StrToDate - DateToStr

2000-10-25 Thread John Christenhusz

Hi all,

Who knows the answer to this simple problem?

DateToStr(now) returns nicely the string equivalent for the current date 
using ShortDateFormat.

StrToDate('date string') returns the TDateTime for the given date string. 
However, when you have the date time settings so that you use e.g. 
'25-Oct-2000', thus the ShortDateFormat = 'dd-MMM-' then it falls over.

The help on StrToDate says "ShortDateFormat global variable--possible 
combinations are m/d/y, d/m/y, and y/m/d".
This implies (to my opinion) that StrToDate is not using the 
ShortDateFormat !

Eg. (using ShortDateFormat = 'dd-MMM-' )
DateToStr(now) returns nicely '25-Oct-2000'
but StrToDate needs '25-10-2000'

and so StrToDate( DateToStr(now) ) does not work!!


Has anybody any code to do a String-To-Date conversion using 
ShortDateFormat?


Thanks a lot for any help.

John.

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



RE: [DUG]: StrToDate - DateToStr

2000-10-25 Thread John Christenhusz

This is great, fantastic, just what I needed.

Thanks a lot Kurt.

John


On Monday, October 23, 2000 1:31 PM, Kurt [SMTP:[EMAIL PROTECTED]] wrote:
 Try using VarToDateTime. It takes a variant parameter, so you just 
 pass in a string. Being a variant its too slow for doing a lot of 
 calculations, but for a gui it is fantastic as it can handle all 
 these formats without blinking:
 'oct 23 00'
 '23 oct 00'
 '23-10/00'
 '23/10 2000'
 '10/23/00'
 '23 00 oct'
 '23 octob 00'
 all convert to '23/10/2000'
 'october 2000'
 '00 oct'
 both convert to '1/10/2000'
 and you only need to trap the EVariantError exception.
 
 Cheers.

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



[DUG]: PC id

2000-10-29 Thread John Christenhusz

G'day all,

Can anybody tell me what would be the best registry value to use as a PC 
identification?

John
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



RE: [DUG]: Anyone developing on Windows ME?

2000-10-30 Thread John Christenhusz

Yes, works very nicely without any problems at all.

Win2000 seems a lot more robust than Win98!

Cheers,
John

On Tuesday, October 31, 2000 12:31 PM, [EMAIL PROTECTED] 
[SMTP:[EMAIL PROTECTED]] wrote:
 Is it better than win98.  A little more robust perhaps?  I currently use
 Win2000 on
 my laptop but am looking at purchasing a desktop (more for games than
 development
 though!).
 
 JED
 
 ---
 New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 To UnSub, send email to: [EMAIL PROTECTED] 
 with body of "unsubscribe delphi"
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



[DUG]: Work wanted

2000-11-20 Thread John Christenhusz

G'day folks,

My current contract work finishes this month and am looking at another
Delphi Development job.

Please drop me an e-mail (personally, not to the List) if you have or know
anything.

Thanks a lot.

John Christenhusz
C/- Post Office
PUHOI - 1240
Phone:  09-422.0601
Mobile: 021-johnch (021-564624)
E-mail: [EMAIL PROTECTED]


 winmail.dat


RE: [DUG]: String Format problem

2000-11-27 Thread John Christenhusz



Did 
you set the table-field's property 'Currency' to TRUE?

and 
don't use the $ sign in the format string.

Cheers,

John.

  -Original Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Mark 
  HowardSent: Wednesday, 29 November, 2000 11:42To: 
  Multiple recipients of list delphiSubject: [DUG]: String Format 
  problem
  Hi
  
  'nother newbie question.
  
  I am reading a QRExpr field in a QuickReport band 
  and want to write it out (to an ascii file) formatted as $##,##0.00, but 
  can't.
  
  I have the following:
  
  procedure WriteStuff;
  var Amt : Currency
  
  begin
Amt := 
  SubTotal.Value.dblResult;  
  Write(AsciiFile,CurrToStr(Amt));end.
  
  The output is not in any currenvy 
  format.
  
  Have also tried:
  
  
  procedure WriteStuff;
  var Amt : String
  
  begin
Amt := 
  FormatCurr('$##,##0.00',SubTotal.Value.dblResult); 
   Write(AsciiFile,Amt);end.
  
  This puts the $ in but the output has up to 4 decimal places.
  
  Any suggestions?
  
  TIA
  
  Mark


[DUG]: Debugger

2000-12-17 Thread John Christenhusz

Hi all,

All of a sudden my Delphi environment (D4) doesn't allow me to set break
points or to step through.
The "Integrated Debugger" checkbox in "Tools/Debugger Options/" is on.

Any ideas?

Thanks,

John Christenhusz


---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



RE: [DUG]: Debugger not working

2000-12-17 Thread John Christenhusz

Hi Stacey,

I've got Debug Information ON.

Has anybody any other ideas?

John Christenhusz

 -Original Message-
 Check you project options. You may be compiling without debug information.
 Stacey

  -Original Message-
  From: John Christenhusz [mailto:[EMAIL PROTECTED]]
  Sent: Monday, 18 December 2000 10:40 a.m.
  To: Multiple recipients of list delphi
  Subject: [DUG]: Debugger
 
 
  Hi all,
 
  All of a sudden my Delphi environment (D4) doesn't allow me
  to set break
  points or to step through.
  The "Integrated Debugger" checkbox in "Tools/Debugger Options/" is on.
 
  Any ideas?
 
  Thanks,
 
  John Christenhusz

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



[DUG]: TImage and JPG files

2001-01-30 Thread John Christenhusz

G'day folks,

I've got this TImage component showing images on request from a directory.
This works file with *.BMP files, but don't seems to work with *.JPG files.

The code I'm using is as follows:

if fileExists(intToStr(iNumber) + '.JPG) then
  imgPhoto1.picture.loadFromFile(intToStr(iNumber) + '.JPG)
else
if fileExists(intToStr(iNumber) + '.BMP) then
 imgPhoto1.picture.loadFromFile(intToStr(iNumber) + '.BMP)


Thus initially it searches for a JPG file else it loads a BMP file.


The BMP file get loaded and shows correctly, but the JPG file returns the
following message when loaded into the TImage:
"Unknown picture file extension (.JPG)"

Any idea?

Thanks for your help.

John Christenhusz
E-mail: [EMAIL PROTECTED]

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



RE: [DUG]: TImage and JPG files - 2

2001-01-31 Thread John Christenhusz

Hi Laurence,

U wrote:
 You need to include the Jpeg.pas file in your unit.
Is this a standard Delphi file? I can't find this file on my system.


I still wonder, why can TImage load a BMP or JPG image at design-time but
can't load the same JPG at run-time?


Thanks for any help,

John Christenhusz




Original message:
-
I've got this TImage component showing images on request from a directory.
This works file with *.BMP files, but don't seems to work with *.JPG files.

The code I'm using is as follows:

if fileExists(intToStr(iNumber) + '.JPG) then
  imgPhoto1.picture.loadFromFile(intToStr(iNumber) + '.JPG)
else
if fileExists(intToStr(iNumber) + '.BMP) then
 imgPhoto1.picture.loadFromFile(intToStr(iNumber) + '.BMP)


Thus initially it searches for a JPG file else it loads a BMP file.


The BMP file get loaded and shows correctly, but the JPG file returns the
following message when loaded into the TImage:
"Unknown picture file extension (.JPG)"

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



[DUG]: Strange behaviour

2001-01-31 Thread John Christenhusz

G'day all,

Since a couple of days I've noticed (D4) that I can't copy any text from the
object inspector to the source anymore. When I highlight text from the
object inspector and press Ctrl-C it doesn't copy it to the clipboard.

Any suggestions what may cause this and how to fix this?

Thanks a lot
John Christenhusz

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



RE: [DUG]: Strange behaviour

2001-02-04 Thread John Christenhusz

No, that's not the case. Also, I'm running D4 not D5.

Has anybody else any suggestions (apart from reinstalling D4)?


 Stacey Verner wrote:
 Is your object inspector docked to anything? Copy only seems to work when
 the object inspector is not docked. I don't think that this is a 
 problem in D5.


  -Original Message-
  Since a couple of days I've noticed (D4) that I can't copy 
  any text from the
  object inspector to the source anymore. When I highlight text from the
  object inspector and press Ctrl-C it doesn't copy it to the clipboard.
  
  Any suggestions what may cause this and how to fix this?
  
  Thanks a lot
  John Christenhusz

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



RE: [DUG]: Borland Kylix product launch and training!

2001-02-06 Thread John Christenhusz

 It is my pleasure to announce that Borland will be holding a 
 product launch
 for Kylix on Friday 23 February 2001 at The Carlton Hotel, corner Mayrol
 Drive  Vincent Streets, Auckland.


What time?
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



[DUG]: Deleting records

2001-02-19 Thread John Christenhusz

G'day folks,

I want to delete certain records from multiple linked tables.
The criteria (defined in sFILTER) is e.g. "ClientType = 2"

What I did is, I created the following SQL and delete records in a loop.
The thing is, that the loop seems to work quite well, it counts down
(indicated by the recordCount value, but:
- it deletes not all the records with the specified criteria, and
- it also deletes a few records outside of the specified criteria,
- sometimes it runs through the loop and after all it did not delete any
records at all, but while running in the loop they seem to disappear
otherwise it wouldn't come out of the loop.

What's wrong?

Please find the code below:

  disableControls;
  query.clear;
  query.add('SELECT c.ID, c.ClientType, p.ID');
  query.add('FROM RE_Client c, RE_Property p');
  query.add('WHERE (c.ID = p.ID) and (c.' + sFilter + ')');

  OpenAllTables;
  while recordCount  0 do
  begin
try tblClientMaster .delete except
on e:exception do
begin
  showMessage('Failed deleting!' + cCR + e.message);
  exit;
end;
end;
lbl_City.caption := intToStr(recordCount);  // show progress
application.processMessages;
  end;

Note that the other tables are linked up to the ClientMaster table with the
table properties MasterSource and MasterFields

Is this the right way to do a delete on multiple tables?
Can I do this in one go with the SQL "DELETE" statement, if so HOW do I
specify the other tables?

Thanks a lot for any help.

John.

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



[DUG]: BMP to JPEG

2001-03-14 Thread John Christenhusz

Hi all,

Can anybody help me with code or a utility to convert a heap of BMP files
into JPEG files?

Thanks a lot,

John.

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



RE: [DUG]: Traps with MessDlg()

2001-06-20 Thread John Christenhusz

Thanks Steve,

Very good to know about this MesssageDlg.

In addition, wouldn't it be even better to put the MessageDlg in a loop till
Yes or No is clicked!? Otherwise the cancel (x) seems for the user an escape
but for the program an ongoing process that the user definitely not wanted
after all.

Cheers,

John.




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Steve Peacocke
 Sent: Wednesday, 20 June, 2001 17:36
 To: Multiple recipients of list delphi
 Subject: [DUG]: Traps with MessDlg()


 We came across an interesting little ditty the other day that you all may
 want to take note of.

 We had a MessageDlg like the following that gave the user the
 choice of Yes
 or No buttons...

 If MessDlg('Warning: Silly thing done, Process Anyway?' ...) = mrNo then
   Exit // and lose the changes
 else
   PostAllChangesAndUpdateEverything;

 Now the problem occured when a user, not sufficiently confident in what
 he/she was doing, and not built for making management decisions
 like Yes or
 No, closed the message Dialog box by clicking on the little [x]
 on the form
 figuring that was a neat way not to have to make the decision to the
 horrible question and make everything just go away.

 A bit of testing showed that closing the form by using Alt-F4 or clicking
 on the [x] will return an mrCancel even though there is no cancel button.

 We took this insight calmly and in our stride and made the decision to
 panic. We checked all our code (megs and megs of the bloody
 stuff) to check
 each call to MessageDlg to change the above to...

 If MessDlg()  mrYes then


 Steve Peacocke
 (025) 951-251

 Dilbert: Do not meddle in the affairs of dragons for thou art
 crunchy and
 wouldst taste good with sauce

 --
 -
 New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 To UnSub, send email to: [EMAIL PROTECTED]
 with body of unsubscribe delphi


---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi



RE: [DUG]: Traps with MessDlg()

2001-06-21 Thread John Christenhusz

I use a my own MsgDlg from my library, where I can specify;
- a header text,
- message,
- required buttons,
-type of message (showing an associated icon):
- info
- dialogue
- error message
- error message (and terminate)
Both error messages beep and the 2nd error type terminates the application.

Thus no problems (no possibility) with any X close button.

John.
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Max Nilson
 Sent: Thursday, 21 June, 2001 18:37
 To: Multiple recipients of list delphi
 Subject: RE: [DUG]: Traps with MessDlg()


 Steve Peacocke commented:

  I also suppose it depends on what you are trying to do - for example by
  giving your application a unique interface you are giving it a brand and
  therefore recognised against the competition.

 Oddly enough, now that we are 98% custom, in house written controls and
 grids, our customers mostly comment that we look and feel very
 much like an
 Office application! They may be just noticing all the cute little
 glyphs we
 use all over the show, but its a nice compliment all the same.

 As the various compeeting products uses bog standard Windows components
 mostly, this gives us the edge not just against them, but on applications
 using the MFC code, as this does lots of cute looking things out
 of the box.

 Cheers, Max.

 PS: For those not in the know, Paul is my development manager 8-)


 --
 -
 New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 To UnSub, send email to: [EMAIL PROTECTED]
 with body of unsubscribe delphi


---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi



[DUG]: Keyboard Control

2001-06-21 Thread John Christenhusz

G'day folks,

Can anybody tell me how to control a checkbox by the keyboard?

TAI

John
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi



[DUG]: QuickReport - Colour in BW

2001-06-21 Thread John Christenhusz

G'day folks,

Is there any way of printing an TQRImage (loaded as a colour picture)
printed in black  white?

TIA

John.

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi



RE: [DUG]: if case else

2001-06-27 Thread John Christenhusz

Hi Ross,

The problem is that you started the 'if' with 'begin' so the compiler
expects an 'end' which you don't have!

The code should be:

 if InputIsCDG then
 begin
   case WriteRadioGroup.itemindex of
 0: BINbuffer := EmptyWAV;
 1: BINbuffer := CDGbuffer;
 2: BINbuffer := EmptyWAV+CDGbuffer;
   end;
   end
 else
   begin
   case WriteRadioGroup.itemindex of
 0: BINbuffer := copy(CDGbuffer,1,2352);
 1: BINbuffer := copy(CDGbuffer,2353,96);
 2: BINbuffer := CDGbuffer;
   end;
 end;

OR alternatively you can write (not using 'begin'  'end' because the block
is already captured by the case statement):

 if InputIsCDG then
   case WriteRadioGroup.itemindex of
 0: BINbuffer := EmptyWAV;
 1: BINbuffer := CDGbuffer;
 2: BINbuffer := EmptyWAV+CDGbuffer;
   end
 else
   case WriteRadioGroup.itemindex of
 0: BINbuffer := copy(CDGbuffer,1,2352);
 1: BINbuffer := copy(CDGbuffer,2353,96);
 2: BINbuffer := CDGbuffer;
   end;

Cheers,

John

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Ross Levis
 Sent: Thursday, 28 June, 2001 15:53
 To: Multiple recipients of list delphi
 Subject: [DUG]: if case else


 Thanks all for the TimeSeparater help.  OnCreateForm will do the trick.

 I have another beginners question.  The following generates the compiler
 error ' ; not allowed before ELSE'.  I can get around the problem but I
 don't think I should have to!  Does it say somewhere that a Case
 statement can't be in a If..Begin..End block?

 if InputIsCDG then
 begin
   case WriteRadioGroup.itemindex of
 0: BINbuffer := EmptyWAV;
 1: BINbuffer := CDGbuffer;
 2: BINbuffer := EmptyWAV+CDGbuffer;
   end;
 else
   case WriteRadioGroup.itemindex of
 0: BINbuffer := copy(CDGbuffer,1,2352);
 1: BINbuffer := copy(CDGbuffer,2353,96);
 2: BINbuffer := CDGbuffer;
   end;
 end;


---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi



RE: [DUG]: Updating Physical Tables - 2

2001-07-05 Thread John Christenhusz



Hi 
Mark,

This 
function call DBISaveChanges(Handle) sounds great, but:

1. My 
compiler (D4) doesn't know about this call (what file to include 
please?)

2. 
Where does Handle come from?

TIA

John

  -Original Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Mark 
  HowardSent: Friday, 06 July, 2001 09:32To: Multiple 
  recipients of list delphiSubject: [DUG]: Updating Physical 
  TablesI'm sure you will get a more complete answer 
  from someone else, but in themeantime:In my code I have 
  usedDBISaveChanges(Handle);immediately after each Post.although I 
  discovered later that a much better way is to put that code intothe 
  TTable's After Post event.My understanding is that doing the above will 
  update the database files ondisk but it will still not notify other users 
  that the table has beenupdated - that is another whole question (which is 
  way beyond me at thisstage)Hope this is of some 
  use.Mark


RE: [DUG]: If you had to choose (win98se or WinMe)

2001-07-05 Thread John Christenhusz

I understood that ME is good as long as you don't (want to) install it on
old hardware because of lacking old drivers.
Can any body confirm that (for delphi development) ME would be better than
98 and 2000 better than ME?

John.
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of [EMAIL PROTECTED]
 Sent: Friday, 06 July, 2001 13:43
 To: Multiple recipients of list delphi
 Subject: [DUG]: If you had to choose (win98se or WinMe)


 For development if you had to choose 98 or Me which one would it be.  I
 have a 2000 system
 already but want to get another for games.  I mean testing...  Which has
 better stability?
 I have developed on plain 98 and that was rubbish.  Has SE's stability
 increased or is Me the
 way to go...
 JED



 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the [EMAIL PROTECTED]

 **
 --
 -
 New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
   Website: http://www.delphi.org.nz
 To UnSub, send email to: [EMAIL PROTECTED]
 with body of unsubscribe delphi


---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi



RE: [DUG]: If you had to choose (win98se or WinMe)

2001-07-08 Thread John Christenhusz

Is it worth it to move from 98 to ME at all?

John

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Maurice Butler
 Sent: Saturday, 07 July, 2001 11:40
 To: Multiple recipients of list delphi
 Subject: Re: [DUG]: If you had to choose (win98se or WinMe)
 
 
 Just for my 2 cents worth.
 ME is almost as stable as 98 now but you have to have IE5.5/agp graphics
 card/pci sound with all the patches and latest drivers for everything.
 
 Maurice Butler
 
 
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi



[DUG]: Quick report buttons

2001-07-17 Thread John Christenhusz

Hi,

With Quick report, is there any way of disabling the top row buttons (all
except the print  close button) in the preview?

TIA

John

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



RE: [DUG]: Quick report buttons

2001-07-18 Thread John Christenhusz

Good one, thanks a lot Patrick.

Cheers,
John

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Patrick Dunford
 Sent: Wednesday, 18 July, 2001 18:40
 To: Multiple recipients of list delphi
 Subject: RE: [DUG]: Quick report buttons
 
 
 Don't know but if you create your own preview form with the preview
 component you can put any buttons you want on it
 

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



RE: [DUG]: [Q] Windows Update / BDE

2001-08-14 Thread John Christenhusz



Hi 
Donavan,

I've 
had a similar problem recently. The application ran fine on my development 
machine, my laptop, and4 brand new machines at my client, but not 
onthe 5th new machine (same client, similar machine, same 
processoretc). It came up with an exception violation, obviously not 
telling what the problem was. After a some hard debugging (because on my 
development machine it ran fine) I found the problem:I free-ed a 
form earlier and updated a Tlabel afterwards. Strangely enough all the other 
machines didn't pick this up at run-time except for this one machine. I still 
wonder why it worked fine on the other machines.
So, 
this may give you an idea to look for.

Cheers,
John

  -Original Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Donovan J. 
  EdyeSent: Tuesday, 14 August, 2001 16:10To: Multiple 
  recipients of list delphiSubject: [DUG]: [Q] Windows Update / 
  BDEG'Day All,This is a very strange one. I have a 
  Paradox / BDE application installed on a client's Win98 machine. Application 
  works 100%. Client then runs Windows Update and things start breaking. The 
  application starts up and manages to open the tables that it does usually. 
  However when applying some filters and doing a query it hangs. I got the 
  client to re-install the BDE but the problem did not go away. Tests on other 
  Win 9x boxes show the application to work without a problem. Can someone give 
  me __any__ suggestions on things I could try?TIA
  -- 
  Donovan 
  -- 
  Donovan J. Edye [www.edye.wattle.id.au] 
  Namadgi Systems [www.namsys.com.au] 
  Voice: +61 2 6285-3460 Fax: +61 2 6285-3459 TVisualBasic = 
  Class(None); Heard just before the 'Big Bang': "...Uh Oh" 
  -- 
  GXExplorer [http://www.gxexplorer.org] 
  Freeware Windows Explorer replacement. Also includes freeware delphi 
  windows explorer components. 
  --


[DUG]: TwwdbGrid

2001-08-14 Thread John Christenhusz

Hi folks,

I want to change the text in a TwwdbGrid for a particular item. The
following code doesn't work:

procedure TformREDB.dbgridSearchCalcCellColors(Sender: TObject; Field:
TField;
  State: TGridDrawState; Highlight: Boolean; AFont: TFont; ABrush:
TBrush);
begin
if (field.name = 'tblClientPrice') and (tblClientType.asInteger = 2)
then
  field.text := '+ ' + field.text;
end;

It generates the following error:'+ ' is not a valid floating point
value for field 'Price'

Any ideas how to solve this problem?

TIA

John.

 winmail.dat


RE: [DUG]: TwwdbGrid

2001-08-14 Thread John Christenhusz
Title: RE: [DUG]: TwwdbGrid



Thanks 
James for the code, this works great!

As you 
wrote, using the OnDrawDataCell Event is apparently obsolete! What's the 
alternative?

TIA
John

  -Original Message-
  I think the problem is (I could be 
  wrong here) that by changing then Field.Text you are actually attempting to 
  change the underlying datasets field data, which is, by the looks of it, a 
  float or currency field.
  From what I can tell you want to put 
  a '+' sign in the Price Column if it matches the criteria. 
  Try this work around, using the 
  OnDrawDataCell Event (which is apparently obsolete but my version of IP 
  doesn't have the OnDrawColumnCell)
  Procedure 
  TformREDB.dbGridSearchDrawDataCell(Sender : Tobject; const Rect : Trect; Field 
  : Tfield; State : TGridDrawState);Const  PlusSign = '+'; Begin  if 
  (field.name = 'tblClientPrice') and (tblClientType.asInteger = 2) then 
   
  wwwdbGridSearch.Canvas.TextOut(Rect.Left + 5, Rect.Top + 1, 
  PlusSign);End; 



[DUG]: QuickReport

2001-08-16 Thread John Christenhusz

Hi all,

I have a detail band with a stretching QRMemo on it. This doesn't stretch
when required, so I read in the QR help that you should use any stretch
component on a childBand. So I created the childBand (from the detailBand)
and moved the QRMemo to the childBand.
No luck. It still doesn't stretch. Any ideas?

TIA

John.

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



[DUG]: QuickReport

2001-09-10 Thread John Christenhusz

G'day folks,

When a QR report is generated, it shows the first page (when ready) and at
the background it continues processes the remaining pages, that works fine.

But when I close the preview before all pages have been processed, it some
times generates an error:

Access violation at address 017890. Read of address FFF


Any ideas? (I'm using D4)

TIA
John.

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



RE: [DUG]: String Encryption routine

2001-09-25 Thread John Christenhusz

Hi Ross,

The following code is a simple routine to encrypt and decrypt strings. 

Simplicity at it's best! (?)

Cheers,
John.


function EnDecrypt(s : string) : string;
{Function:
Encrypt / Decrypt given string.
 Entry parameters:
s = string to en/decrypt.
 Return value:
En/Decrypted string.}
var
   i : longInt;
begin
   for i := 1 to length(s) do
  s[i] := chr( ord(s[i]) xor $3f);
   result := s;
end;{EnDecrypt}

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



RE: [DUG]: String Encryption routine

2001-09-26 Thread John Christenhusz

Great, show us the code!!

John

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Ross Levis
 Sent: Thursday, 27 September, 2001 13:36
 To: Multiple recipients of list delphi
 Subject: Re: [DUG]: String Encryption routine
 
 
 Thanks for the offer Nirav but I'm successfully using a variation of 
 Phil Scadden's simple routine.  I've just added a simple checksum to it 
 so I can tell if it's been tampered with.
 
 Cheers,
 Ross.

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



[DUG]: Unique PC ID code

2001-10-27 Thread John Christenhusz

Is there a way getting a unique ID code for each PC?

TIA

John
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



RE: [DUG]: automated HTTP file uploads

2001-10-31 Thread John Christenhusz

Hi Paul,

Thanks very much pointing me to the indy web-page.

I had a look at the FTPdemo and that comes pretty close to what I want. Did
you have a look at this demo at all? I'm just a beginner at this field, but
can you possibly tell me how (after getting connected) to change to an
ftp://xxx.xx.xxx address?

TIA

John

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Paul Ritchie
 Sent: Monday, 29 October, 2001 16:35
 To: Multiple recipients of list delphi
 Subject: RE: [DUG]: automated HTTP file uploads


   There is an example (in Delphi 6) in Delphi\Demos\Indy\HTTPClient
   using the Indy TIdHTTP component which might be relevant.

  Has anybody an example for D5 by any chance?

 Definitely.  Indy for D5 is available from www.nevrona.com/indy.
 (I see the
 HTTPClient demo is included in the sample code.)

 Paul.


---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



[DUG]: Const

2001-11-11 Thread John Christenhusz

Hi all,

Can anybody tell me the difference between the following two declarations
and why you want to use the first one. The second one seems to use less
memory!


const
   sName : string = 'This is a test';


and

const
   sName  = 'This is a test';



TIA

John.

---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



[DUG]: dbGrid

2001-10-14 Thread John Christenhusz

G'day folks,

I've asked this question before and did get a satisfactory reply at that
time, but after all it doesn't seem to work the way I want it to.

What I want is to change the presentation of a dbGrig's field only when the
field ('Type') = 2.

Pseudo code:
When Type = 2 then
begin
  when field DateOut = now then
show a string 'YES'
  else
show a string 'NO'
end


This works fine for the very first presentation. But when I scroll down
(removing the top records with a 'YES') and then up again, then the records
with a 'YES' have changed to 'NO'. For some reason the
dbgridSearchDrawDataCell event doesn't seem to correspond with the actual
data.


The code I use is:

procedure TformREDB.dbgridSearchDrawDataCell(Sender: TObject; const Rect:
TRect; Field: TField; State: TGridDrawState);
begin
  if (field.name = 'tblClientType') then
  begin
if tblClientType.asInteger = 2 then
  if tblClientDateOut.asDateTime = now then
dbgridSearch.Canvas.textOut(rect.left + 5,  rect.top + 1, 'Yes');
   else
dbgridSearch.Canvas.textOut(rect.left + 5,  rect.top + 1, 'No');


Any ideas???

TIA




---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of unsubscribe delphi
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/