Ross,

Without going into too much detail here is the general order of code for
Delphi application on startup.

1. Initialisation sections for all units run in a somewhat arbitrary order
based on which units use which.

2. The code in the project source file is executed (Project menu, select
View Source and scroll to the bottom). This code does several things such as
Application.Initialize which are of no interest in your average program. The
important parts are:
2a. Application.CreateForm(TfMyForm, fMyForm) - create any forms or data
modules you want automatically created for your program.
2b. Application.Run - start an endless loop checking for the user to trigger
windows events such as mouse clicks etc. Of course the loop does end
eventually - when the application terminates, generally by closing the last
form.

You are getting an access violation putting code int he Initialisation
section because at that point none of your objects (such as your forms) have
been created. If you put your code in the OnFormCreate or OnFormShow event
of the form then you can be sure that your code will be called as the form
is being created and shown (step 2a above).

HTH,

David.

----- Original Message -----
From: "Ross Levis" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 11:28 PM
Subject: [DUG]: TimeSeparator on form?


> Thanks to all for the Blockwrite help.  It's working well now.
>
> What is the best way to get the international TimeSeparator char in a
label on a
> form at load time.  I tried assigning it in the Initialisation section but
that
> gives me a memory violation.
>
> 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"

---------------------------------------------------------------------------
    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"

Reply via email to