Re: [DUG]: Borland RAD Seminars - Ak, Wgtn, ChCh

2001-10-15 Thread Steve Peacocke

At 04:59 pm 02.10.01, you wrote:
I'll try and fill you in tommorow - doing training today, so I'm rather
flatout. Bottom line is, its Richard and my show, so its mostly going to be
more technical and less marketing driven,

Can we have a starting time for this please? I'm heading up tomorrow 
afternoon so will need to plan a bit. Also, what time does it finish?

Thanks

Steve

---
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]: Event Log interaction with Delphi

2001-10-15 Thread Vaughan, Benjamin Carl

Hi,
I have created a service that logs errors to the NT application event log,
this bit currently works fine.
Within registry you can then specify the application/dll that will handle
the event log descriptions with the EventMessageFile parameter.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\W
atchDog]
EventMessageFile=D:\\Ben\\WorkingFolder\\Services\\Watchdog\\Watchdog.exe


This is supposed to build the description for the event based on the
EventID, and replace the default ugly windows message of 
The description for Event ID ( 71006 ) in Source ( Watchdog Service ) could
not be found. It contains the following insertion string(s):

The problem I have is then getting the event log to pickup the correct
message form the application. What I have tried is to create a StringTable
in a resource file like below, but currently I have had no success and are
still getting the default message.

STRINGTABLE
{
71006, My custom event message here
}

If anyone can shed some light on how to do this it would be greatly
appreciated

Regards
Ben Vaughan

---
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]: Borcon

2001-10-15 Thread vss

Well, I had the offical word today that we are not going to Borconthe 
bean counters felt that the $10k for 2 of us to go was a bit excessive, 
especially after buying D6 enterprise.
There is a general feling of discontent I think about Borland here at the 
moment.
I hear things like,we get better value for money from MS, atleast MS 
do technet in NZ and the like.
Normally I dont get involved in voicing disapproval of Borland, as I 
always thought they did a res. job. But I think the Poor Cousine thing 
seems to rare its head when they dont consider coming to NZ.
We estimated it would have been about 1/2 the price for use to go to 
borcon if it was in Auckland.
I am guessing that the reason others from NZ are not going is due to the 
expense.
Some one made some comments about Borland not really looking after their 
customers, I think yesterday, and I guess its this sort of thing that 
reiterates that thought.

I WISH borland heard comments like this and DID something about it. Even 
a sort of roadshow afterward that showed what we missed and gave us some 
quick run downs etc. would be a great start.

p.s. This is NO reflection on the borland stalf here in NZ. I think they 
do very well with their hands tied.

Cheers, Jeremy Coulter


---
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]: Borcon

2001-10-15 Thread Paul Grimstrup


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of vss
 Sent: Tuesday, 16 October 2001 9:31 am
 To: Multiple recipients of list delphi
 Subject: [DUG]: Borcon


 Well, I had the offical word today that we are not going to Borconthe
 bean counters felt that the $10k for 2 of us to go was a bit excessive,
 especially after buying D6 enterprise.

It is co$tly, but who is going? Maybe those of us who can't make it can
catch up with those who did in November? Heck, this is the first official
training I've had for 3 years =(

I was planning to make some new contacts while over there since I don't know
other Delphi developers in Wellington.

Since the subject was brought up, I would be interested to know if those
Wellingtonians that are going would like to get together for a coffee at
some stage? You know, like a user-group meeting?

Cheers
Paul Grimstrup
[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
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



Wellington Usergroup .RE: [DUG]: Borcon

2001-10-15 Thread Phil Scadden

 I was planning to make some new contacts while over there since I don't know
 other Delphi developers in Wellington.
 
 Since the subject was brought up, I would be interested to know if those
 Wellingtonians that are going would like to get together for a coffee at
 some stage? You know, like a user-group meeting?

I could be interested, but pretty constrained over times. Previous attempts at 
Wellington
group never quite got a time when I could attend.
--
Phil Scadden, Institute of Geological and Nuclear Sciences
41 Bell Rd South, PO Box 30368, Lower Hutt, New Zealand
Ph +64 4 5704821, fax +64 4 5704603

---
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]: Array of labels in QR

2001-10-15 Thread Mark Howard

Nello
Thanks very much for going the extra mile for me.
That solution works well and save quite a few lines of code.  My main
problem was not realising that the FindComponents should have been called
from the form component.
I appreciate your always well considered assistance.
Mark
(Didn't respond earlier because I was out of the office - (Corrs!))
- Original Message -
From: Nello Sestini [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Friday, October 12, 2001 10:36 PM
Subject: Re: [DUG]: Array of labels in QR


   function GetMyLabel(Index:Integer): TQRLabel;
   property MyLabels[Index: Integer]: TQRLabel read GetMyLabel;
  default;
  These two under Public Declarations?

 i'd make GetMyLabel Protected or Private and property Mylabels Public.

 Probably it doesn't much matter because you're not going
 to access the property from outside the form anyway.

  
   function GetMyLabel(Index:Integer):TQRLabel;
   begin
 // in production probably should do some error checking ...
   return FindComponent(format('mylabel_%d',[Index]);
   end;
  This under Implementation

 correct

  Should it be result :=   [...]

 oops - yes it should.   (i've been writing C++ - i knew something
 would creep in).

  Should it be   [...]  MyLabels.FindComponent ...etc?

 no.FindComponent searches the component list by name.

 So you want to call the FindComponent method of the owner of your
 QRLabels.   This is the TForm.

  I get error Undeclared identifier - MyLabels

  If I leave MyLabels out I get error Undeclared identifier -
  FindComponent.
 
  I can see how FindComponent would work - I'm just tripped up on the
  declaration details, I think.

 see above.

 I regret winging this - it's too confusing.Here is a revised
 version of the functions (that DO compile and even work) which
 should be a lot clearer.

 Also, I've posted the full .pas and .dfm files here
 http://roserox.co.th/dugnz/unit2.pas
 http://roserox.co.th/dugnz/unit2.dfm


 function TForm2.GetMyLabel(Index: Integer): TQRLabel;
 var ret:TQRLabel;
 begin
   // in production probably should do some error checking ...
   result:= FindComponent(format('qrlabel_%d',[Index])) as TQRLabel;
 end;

 procedure TForm2.Button1Click(Sender: TObject);
 var i:integer;
 begin
 for i:=1 to 2 do mylabels[i].caption:='foo';
 end;

 The QReport in this demo program has two labels on it - QRLabel_1
 and QR_Label_2

 -ns






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


---
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]: Source Scrounge

2001-10-15 Thread Neven MacEwan

Hi all

Does anyone have source for a simple Tedit that has a button on the right 
(like an ellipses) and an OnButtonClick Event

TIA

 Regards Neven
 N.K. MacEwan B.E. EE
 Ph 649 574 0027
 Fax 649 570 2706
 [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
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



Re: [DUG]: Really simple question

2001-10-15 Thread Robert Martin

.. on behalf of Simon

I have used the first solution below to implement multiple windows with
their own taskbar tabs within one application. The problem I have is that
when any of the child windows with their own tabs display a modal form (or
dialog), the child window itself hides while the modal form is showing. How
do I get around this?


- Original Message -
From: Edward Aretino [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Monday, September 24, 2001 6:21 PM
Subject: Re: [DUG]: Really simple question


 Simple, but not exactly intuitive (btw, I use the second method)..

  From Peter Below :
 -


 If you want to have a separate taskbar button for each secondary window
you
 have two options:

 1. override the CreateParams method of each secondary form and add the
 WS_EX_APPWINDOW style:

 procedure TForm2.CreateParams(Var params: TCreateParams);
begin
  inherited CreateParams( params );
  params.ExStyle := params.ExStyle or WS_EX_APPWINDOW;
end;

 If you click on a secondary forms taskbar button while another app is
 active this will still bring all the applications forms to front. If you
do
 not want that there is option

 2. reparent the secondary forms to the desktop

 procedure TForm2.CreateParams(Var params: TCreateParams);
begin
  inherited CreateParams( params );
  params.ExStyle := params.ExStyle or WS_EX_APPWINDOW;
  params.WndParent := GetDesktopwindow;
end;

 Note that this can cause some problems with modal forms shown from
 secondary forms. If the user switches away from the app while a modal form
 is up and then back to the form that showed it the modal form may hide
 beneath the form. It is possible to deal with this by making sure the
modal
 form is parented to the form that showed it (using params.WndParent as
 above) but this is not possible with the standard dialogs from the Dialogs
 unit and exceptions, which need more effort to get them to work right
 (basically handling Application.OnActivate, looking for modal forms
 parented to Application via GetLastActivepopup and bringing them to the
top
 of the Z-order via SetWindowPos).

 Peter Below (TeamB)




 At 15:04 24/09/2001 +1200, you wrote:
 Hi Im sure this is a really simple question but I just cant remember...
 
 How do you set a new form (non modal) to have its own entry on the
taskbar?
 
 TIA
 
 Robert Martin
 Software Engineer
 Wild Software Ltd

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



---
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]: Chart FX Problems

2001-10-15 Thread Stacey Verner



Anybody Using Chart FX 4.0 (98) or 
ChartFX 5.0 with Delphi 6?

If I try to 
use either of these products with Delphi 6 I get an Invalid Variant Operation 
error.

Both work fine 
in Delphi 4.

I have 
installed Delphi 6 Update Pack 1.

Thanks

Stacey

Stacey 
Verner 
Ph: +64-9-4154790Software 
Developer Fax: 
+64-9-4154791 
DDI: +64-9-4154797CJN Technologies Ltd. Email: 
[EMAIL PROTECTED]PO Box 302-278, North Harbour, Auckland 1330, New Zealand12 
Piermark Drive, North Harbour, Auckland, New ZealandVisit our website at http://www.cjntech.co.nz/ 





RE: [DUG]: Source Scrounge

2001-10-15 Thread Tom Munro Glass
Title: RE: [DUG]:  Source Scrounge






LMD Tools TLMDEdit component does this, but I can't give you the source! It may be in the lite version on the Delphi companion tools CD.

Tom Munro Glass


 -Original Message-

 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On

 Behalf Of Neven MacEwan

 Sent: Tuesday, 16 October 2001 10:31 a.m.

 To: Multiple recipients of list delphi

 Subject: [DUG]: Source Scrounge

 

 

 Hi all

 

 Does anyone have source for a simple Tedit that has a button 

 on the right 

 (like an ellipses) and an OnButtonClick Event

 

 TIA

 

 Regards Neven

 N.K. MacEwan B.E. EE

 Ph 649 574 0027

 Fax 649 570 2706

 [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

 Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

 





Re: [DUG]: Event Log interaction with Delphi

2001-10-15 Thread Nello Sestini

 The problem I have is then getting the event log to pickup the correct
 message form the application. What I have tried is to create a StringTable
 in a resource file like below, but currently I have had no success and are
 still getting the default message.

 STRINGTABLE
 {
 71006, My custom event message here
 }

 If anyone can shed some light on how to do this it would be greatly
 appreciated


I've never done this in a Delphi App - but have using VC++ and that project
does it (I hope you are sitting down) like this:

as part of the application build, BEFORE the link or compile, it runs
a utility called MC.EXE

MC takes a text .MC file with messages (separated by blank lines) formatted
like this:

MessageID=
SymbolicName=MC_REBOOTSENTRYSTARTED
Language=English
Reboot sentry thread started
.

and produces as output 3 files:

   (1) a C++ header file with defines like this:

//
// MessageId: MC_REBOOTSENTRYSTARTED
//
// MessageText:
//
//  Reboot sentry thread started
//
#define MC_REBOOTSENTRYSTARTED   0x1009L

   (2) a binary .bin file (call it MSG1.bin).


the program includes the .h file so it can reference the
#defined message identifiers in calls to the EventLog API.


   (3) and a .rc file to include with the application resource
   script .rc file for the app with lines like these:

LANGUAGE 0x9,0x1
1 11 MSG1.bin


When the application .rc script is compiled, it will use
the .bin file to create a type 11 binary resource which
is what the NT message system expects to find when formatting
messages.

It is one of Microsofts more spectacular examples of making
something that could be so simple absurdly complex.

The one problem that i don't see a way around is what you use
to compile the .mc file to create that binary resource.The
MC utility I'm using is part of the Win32 SDK - maybe you can
download it from the MS website - not sure.

BTW - one word of caution - debugging this stuff is a pain
because of DLL caching.

hope this is useful

-ns
http://roserox.co.th




---
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]: Event Log interaction with Delphi

2001-10-15 Thread Myles Penlington

Thats right, 
you have to use the microsoft message compiler which then spits out a RES
file and include that in your application. You then also have to register
you application so that the event log knows which exe or dll contains the
messages.

MessageId=5
SymbolicName=EVENTLOG_CAT_EXPORTER
Language=English
Results Export
.

And

  //Registry Key values
  EventTypesKey = 'TypesSupported';
  EventCatCountKey  = 'CategoryCount';
  EventMessagesKey  = 'EventMessageFile';
  EventCategoryKey  = 'CategoryMessageFile';

  EventLogKey=
'\SYSTEM\CurrentControlSet\Services\EventLog\Application\YourAppName';

  {$IFDEF CHECKEVENTLOG}
Rgstry := TRegistry.Create;
try 
  GetDLLFileName;
  Rgstry.RootKey := HKEY_LOCAL_MACHINE;
  if not (Rgstry.OpenKeyReadOnly( EventLogKey ) and (DLLFileName =
Rgstry.ReadString( EventMessagesKey )) and (Rgstry.ReadInteger(
EventCatCountKey ) = EVENTLOG_CAT_COUNT)) then begin
Rgstry.CloseKey;
Rgstry.RootKey := HKEY_LOCAL_MACHINE;
Rgstry.Access  := KEY_WRITE or ((STANDARD_RIGHTS_READ or
KEY_QUERY_VALUE) and not SYNCHRONIZE);
if Rgstry.OpenKey( EventLogKey, True ) then begin
  Rgstry.WriteInteger( EventTypesKey, 7 );
  Rgstry.WriteInteger( EventCatCountKey, EVENTLOG_CAT_COUNT );
  Rgstry.WriteExpandString( EventMessagesKey, DLLFileName );
  Rgstry.WriteExpandString( EventCategoryKey, DLLFileName );
end;
  end;
finally
  Rgstry.CloseKey;
  Rgstry.Free;
end;
  {$ENDIF}

Myles.


-Original Message-
From: Nello Sestini [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 16 October 2001 12:49 p.m.
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Event Log interaction with Delphi


 The problem I have is then getting the event log to pickup the correct
 message form the application. What I have tried is to create a StringTable
 in a resource file like below, but currently I have had no success and are
 still getting the default message.

 STRINGTABLE
 {
 71006, My custom event message here
 }

 If anyone can shed some light on how to do this it would be greatly
 appreciated


I've never done this in a Delphi App - but have using VC++ and that project
does it (I hope you are sitting down) like this:

as part of the application build, BEFORE the link or compile, it runs
a utility called MC.EXE

MC takes a text .MC file with messages (separated by blank lines) formatted
like this:

MessageID=
SymbolicName=MC_REBOOTSENTRYSTARTED
Language=English
Reboot sentry thread started
---
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]: modification dates.

2001-10-15 Thread Matthew Comb

Hi Rohit, I found out some interesting information on the microsoft site.

Apparently NTFS stores files in UTC (grenich mean time) whereas fat stores
local time zone information. This may explain why on nt4 you were getting
different results with different drives.

I have more information and the link to the technical info as well if you
are interested.

- Original Message -
From: Rohit Gupta [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Monday, October 15, 2001 3:57 PM
Subject: Re: [DUG]: modification dates.


 Its worse than that.  IT changes on 2000.  However on Nt4, it
 changes on some drives for some users 9Seemingly at random).
 This was supposed to be fixed in Sp5 or thereaboust but it has
 probably come back.

 When you think about it, there is no solution.  Assuming that 2000
 now stores the GMT for filedatetimestamps, transalation to local
 time will change on whether you have day light saving on or not.  IT
 still a pain in the posterior when suddenly thousands of your files
 suddenly change thier date of modification.

 To: Multiple recipients of list delphi [EMAIL PROTECTED]
 Send reply to:  [EMAIL PROTECTED]
 From:   Matthew Comb [EMAIL PROTECTED]
 Subject:[DUG]:  modification dates.
 Date sent:  Mon, 15 Oct 2001 14:16:21 +1300

  Hi people. I have found something interesting with the modification
dates
  for files on different operating systems.
 
  On windows 98 if you change time zone or daylight savings the
modification
  date doesn't change, on windows 2000 if you change those settings, the
  modification date DOES change at least it does on my machine.
 
  1. Can some other people test that for me on different configurations
and
  tell me what they get? (particularly interested in win 95 and win nt 4).
 
  2. Does anyone know why this difference exists?
 
  3. Does anyone know how windows handles dates with regard to files and
time
  zones?
 
  Any help would be appreciated.
 
  Matthew Comb
  Technical Director
  Mobile: (021) 350 147
 
  FileSafe  -  http://www.filesafe.co.nz
  Numberworks  -  http://www.numberworks.com
 
  The information contained in this message and attachments is
confidential
  and intended for the named recipient(s). If you have received this
message
  in error: 1. You are prohibited from copying, distributing, and using
the
  information. 2. Please contact the sender immediately and destroy
original
  message. If you have any doubt about the authenticity of this message,
  please confirm with the sender.
 
 
 

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


 Regards

 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
 To UnSub, send email to: [EMAIL PROTECTED]
 with body of unsubscribe delphi
 Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/


---
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]: Event Log interaction with Delphi

2001-10-15 Thread Vaughan, Benjamin Carl

Thanks Nello  Myles,

I have used MC and created a .rc and .bin file which I have been able to
successfully add to my Delphi project and compile it. I then have used a
useful little application called Resource Hacker, and can confirm that the
message table is now within the application.

Unfortunately the application is still not logging correctly. On further
examination with Resource Hacker on other applications that use the
application log (Norton Antivirus and ASP.DLL) I noticed that the messages
that I create come in as I specify them (i.e. specify 106 in the MC file,
and it ends up as 106 in the application). All other applications seem to
have unusual numbers in the application itself eg.

106,Test Message (%1!s!).
(taken from my App)

1090453506, \n%1
1090453507, \n%1
(taken from the Norton Antivirus application.)
(Norton AV responds to EventID's such as 7,14..etc which are no where to be
seen in their message file) 

What I am wondering is if there is some constant that I need to add to my
EventID's or anything else.

Regards
Ben

---
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]: Event Log interaction with Delphi

2001-10-15 Thread Myles Penlington

There is nothing else to add (normally).

Quite a few applications follow the MS convention and actually log a HRESULT
value, hence the funny values that you see.

Ie If you log event# 106, then your message/event file must have event#106
present.

If you follow the MS examples that come with the message compiler - from
memory you will then end up in trouble (as I did first time around), as they
use macros in the message compiler to do bit twiddling for HRESULT values.

You can check the registry to see if your event file is registered correctly
if that will help.

Myles.



-Original Message-
From: Vaughan, Benjamin Carl [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 16 October 2001 2:13 p.m.
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Event Log interaction with Delphi


Thanks Nello  Myles,

I have used MC and created a .rc and .bin file which I have been able to
successfully add to my Delphi project and compile it. I then have used a
useful little application called Resource Hacker, and can confirm that the
message table is now within the application.

Unfortunately the application is still not logging correctly. On further
examination with Resource Hacker on other applications that use the
application log (Norton Antivirus and ASP.DLL) I noticed that the messages
that I create come in as I specify them (i.e. specify 106 in the MC file,
and it ends up as 106 in the application). All other applications seem to
have unusual numbers in the application itself eg.

106,Test Message (%1!s!).
(taken from my App)

1090453506, \n%1
1090453507, \n%1
(taken from the Norton Antivirus application.)
(Norton AV responds to EventID's such as 7,14..etc which are no where to be
seen in their message file) 

What I am wondering is if there is some constant that I need to add to my
EventID's or anything else.

Regards
Ben

---
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/
---
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]: Really simple question

2001-10-15 Thread Patrick Dunford

By the way, the reply that he got appears to come from the Borland
newsgroups.

You  should be able to find them on your ISP's server with names starting
with borland

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Robert Martin
 Sent: Tuesday, 16 October 2001 11:11
 To: Multiple recipients of list delphi
 Subject: Re: [DUG]: Really simple question


 .. on behalf of Simon

 I have used the first solution below to implement multiple windows with
 their own taskbar tabs within one application. The problem I have is that
 when any of the child windows with their own tabs display a modal form (or
 dialog), the child window itself hides while the modal form is
 showing. How
 do I get around this?


 - Original Message -
 From: Edward Aretino [EMAIL PROTECTED]
 To: Multiple recipients of list delphi [EMAIL PROTECTED]
 Sent: Monday, September 24, 2001 6:21 PM
 Subject: Re: [DUG]: Really simple question


  Simple, but not exactly intuitive (btw, I use the second method)..
 
   From Peter Below :
  -
 
 
  If you want to have a separate taskbar button for each secondary window
 you
  have two options:
 
  1. override the CreateParams method of each secondary form and add the
  WS_EX_APPWINDOW style:
 
  procedure TForm2.CreateParams(Var params: TCreateParams);
 begin
   inherited CreateParams( params );
   params.ExStyle := params.ExStyle or WS_EX_APPWINDOW;
 end;
 
  If you click on a secondary forms taskbar button while another app is
  active this will still bring all the applications forms to front. If you
 do
  not want that there is option
 
  2. reparent the secondary forms to the desktop
 
  procedure TForm2.CreateParams(Var params: TCreateParams);
 begin
   inherited CreateParams( params );
   params.ExStyle := params.ExStyle or WS_EX_APPWINDOW;
   params.WndParent := GetDesktopwindow;
 end;
 
  Note that this can cause some problems with modal forms shown from
  secondary forms. If the user switches away from the app while a
 modal form
  is up and then back to the form that showed it the modal form may hide
  beneath the form. It is possible to deal with this by making sure the
 modal
  form is parented to the form that showed it (using params.WndParent as
  above) but this is not possible with the standard dialogs from
 the Dialogs
  unit and exceptions, which need more effort to get them to work right
  (basically handling Application.OnActivate, looking for modal forms
  parented to Application via GetLastActivepopup and bringing them to the
 top
  of the Z-order via SetWindowPos).
 
  Peter Below (TeamB)
 
 
 
 
  At 15:04 24/09/2001 +1200, you wrote:
  Hi Im sure this is a really simple question but I just cant remember...
  
  How do you set a new form (non modal) to have its own entry on the
 taskbar?
  
  TIA
  
  Robert Martin
  Software Engineer
  Wild Software Ltd
 
 
 --
 -
  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/
 


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


---
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]: Event Log interaction with Delphi

2001-10-15 Thread Nello Sestini

Ben

There is some bit fiddling going on here - i have never
looked at it too closely - after I got it working i'm almost
afraid to.

But - here are the first few lines of .h file that gets
created.

These comments document the extra bits that get or'd into
the message IDs. I think this probably explains some
of what you are asking about.

(you can ignore the CAT stuff - it has to do with
message categories that this app uses.

-ns
http://www.roserox.co.th




#define CAT_BASIC 1
//
//  Values are 32 bit values layed out as follows:
//
//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
//  +---+-+-+---+---+
//  |Sev|C|R| Facility  |   Code|
//  +---+-+-+---+---+
//
//  where
//
//  Sev - is the severity code
//
//  00 - Success
//  01 - Informational
//  10 - Warning
//  11 - Error
//
//  C - is the Customer code flag
//
//  R - is a reserved bit
//
//  Facility - is the facility code
//
//  Code - is the facility's status code
//
//
// Define the facility codes
//


//
// Define the severity codes
//


//
// MessageId: 0x0001L (No symbolic name defined)
//
// MessageText:
//
//  IFRTS Basic
//


#define CAT_STARTUP 2
//
// MessageId: 0x0002L (No symbolic name defined)
//
// MessageText:
//
//  Shutdown
//


#define CAT_SHUTDOWN 3
//
// MessageId: 0x0003L (No symbolic name defined)
//
// MessageText:
//
//  Shutdown
//


#define CAT_CategoryCount 3
// CAT_BASIC messages
//
// MessageId: MC_SERVICE_STARTED
//
// MessageText:
//
//  Service started
//
#define MC_SERVICE_STARTED   0x1000L

  [...] snip






- Original Message -
From: Vaughan, Benjamin Carl [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Tuesday, October 16, 2001 8:12 AM
Subject: RE: [DUG]: Event Log interaction with Delphi


 Thanks Nello  Myles,

 I have used MC and created a .rc and .bin file which I have been able to
 successfully add to my Delphi project and compile it. I then have used a
 useful little application called Resource Hacker, and can confirm that the
 message table is now within the application.

 Unfortunately the application is still not logging correctly. On further
 examination with Resource Hacker on other applications that use the
 application log (Norton Antivirus and ASP.DLL) I noticed that the messages
 that I create come in as I specify them (i.e. specify 106 in the MC file,
 and it ends up as 106 in the application). All other applications seem to
 have unusual numbers in the application itself eg.

 106,  Test Message (%1!s!).
 (taken from my App)

 1090453506,  \n%1
 1090453507,  \n%1
 (taken from the Norton Antivirus application.)
 (Norton AV responds to EventID's such as 7,14..etc which are no where to
be
 seen in their message file)

 What I am wondering is if there is some constant that I need to add to my
 EventID's or anything else.

 Regards
 Ben

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


---
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]: Collections

2001-10-15 Thread vss

Hi all.
I was wondering can you save a collection to a file as you do a record 
structure ??

Thanks,Jeremy Coulter


---
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]: Collections

2001-10-15 Thread Myles Penlington

Yes. The standard streaming facilites will save TCollections fine.

-Original Message-
From: vss [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 16 October 2001 3:57 p.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Collections


Hi all.
I was wondering can you save a collection to a file as you do a record 
structure ??

Thanks,Jeremy Coulter


---
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/
---
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]: Collections

2001-10-15 Thread vss

SweetI will now try itdidnt bother incase I was wasteing my 
time :-)

Thanks,Jeremy

-Original Message-
From: Myles Penlington [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Date: Tue, 16 Oct 2001 15:55:31 +1300
Subject: RE: [DUG]:  Collections

 Yes. The standard streaming facilites will save TCollections fine.
 
 -Original Message-
 From: vss [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 16 October 2001 3:57 p.m.
 To: Multiple recipients of list delphi
 Subject: [DUG]: Collections
 
 
 Hi all.
 I was wondering can you save a collection to a file as you do a record 
 structure ??
 
 Thanks,Jeremy Coulter
 
 
 ---
 
 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/
 ---
 
 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/


---
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]: Quick Report Problem

2001-10-15 Thread Graham Marsden

Hi 

Can anyone help me out with a problem with Title and Column Header in Quick
Report 3

The report I am building list the records from a table with two levels of
groupings and subtotals.

The problem I have is that the first two group headers, (ie for the first
record in the table),  are obscured by the report title and column header bands.

If I take away the report tile and column header bands all is well, and the
first group header details are printed. (so I have the group headers set up ok)

There must be some way to make the group headers print below the title and
column headers..

Hope someone out there has the answer.

Graham Marsden

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

2001-10-15 Thread Mark Howard

Graham
I use QR a lot (for my sins!).
I have had almost every problem imaginable but have never come across this
one, so can't suggest what might be wrong.
Have you checked that the Master of each of the bands is the Report
component?

In these situations I tend to start again adding one band at at a time and
testing at each stage to make sure it's all still working as expected.  I
have found that sometimes the band declaration can disappear from the form
(even though the band is still there on the report) and this can make things
behave unpredictably.  (It can happen if you inadvertently double click on a
band - of if you have a flakey mouse that gives a double when you only gave
it a single click  8-}  ).
Probably not a lot of help.
Mark
- Original Message -
From: Graham Marsden [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Tuesday, October 16, 2001 4:15 PM
Subject: [DUG]: Quick Report Problem


 Hi

 Can anyone help me out with a problem with Title and Column Header in
Quick
 Report 3

 The report I am building list the records from a table with two levels of
 groupings and subtotals.

 The problem I have is that the first two group headers, (ie for the first
 record in the table),  are obscured by the report title and column header
bands.

 If I take away the report tile and column header bands all is well, and
the
 first group header details are printed. (so I have the group headers set
up ok)

 There must be some way to make the group headers print below the title and
 column headers..

 Hope someone out there has the answer.

 Graham Marsden

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


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