Re: [DUG]: Delphi 8 etc

2003-11-13 Thread Corey Murtagh
Tracey Maule wrote:

Q:  Why do my emails come through as blank when i reply to an existing 
DUG mail??
The message has headers formatted for an HTML message, but no body. 
Either your client is mangling them (possible) or they're getting chewed 
up by the listserv.  Have a look at the details of the message in your 
'sent' folder and see if there's anything odd in the headers compared to 
what you see in the version you got back.

Might be something to do with the spam check, for example.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Basic question on custom components

2003-11-11 Thread Corey Murtagh
[EMAIL PROTECTED] wrote:

snip
 From an instance of my new component (TUVTable, dropped on the form), I 
need to call methods of the instance of the TUVObject component on my 
form. In TUVTable.pas I could add a uses clause, MainUnit, and then call 
MainUnit.UVObject1.method - so allowing communication between the 2 
component instances. This is silly as if the user of my component has 
named their unit something other than MainUnit, then it won't work.
Stacey's answer is the normal method, and it's a good one.  It basically 
creates a link between the two components, which is much more generic 
than linking to the other object statically or trying to find it at 
runtime.  Same as linking a TDBGrid to a TDataSource.

One other option, although it's not a terribly good one, is to iterate 
the components on the form and find the one with the correct type. 
TObject.TypeName or something similar will work for that.

Probably better to do it the classic way though :

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Copy protection/program registration

2003-11-11 Thread Corey Murtagh
Kurt at DBC wrote:

Ross Levis wrote:


impossible anyway.  It should be unique on every PC unless a user has
illegally installed Windows on multiple PC's.
Not particularly helpful, but ISTR that all you need is a windows
license for each installation, rather than use the exact cd for each,
this'd probably bite you in a corporate.
You need to own a license for each computer using it, but there's not 
much stopping you from using the same key to install every machine in 
the office.  Or, more usually, ghosting an install.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Copy protection/program registration

2003-11-11 Thread Corey Murtagh
Leigh Wanstead wrote:

I think there is no need to pay too much attention on this. Just look at how
Borland did for Delphi product series. There is always someone can hack the
application if he/she consider it is worth it. Better put that energy on
improving software and offer a good support.
I agree.  A very simple protection is, ultimately, just as effective as 
spending hundreds of hours, or thousands of dollars, on it.  If someone 
wants to crack it they will, etc.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Copy protection/program registration

2003-11-11 Thread Corey Murtagh
vss wrote:
I have come across one program called PicBasic which uses some PC 
Specific information that you send back to them and they send you a key.
What ever the software they use for the protection, its pretty good. I 
actually own the app. but was interested to see how strong it was, and 
beleive me, after about 2hrs of constantly hacking and playing, i could 
not crack itso whatever it is, its great. I wanted to use the 
software for a project I have just finished, but the problem is that I 
cant make it PC specific.
PC-specific isn't terribly difficult, but is a pain in the butt when you 
want to upgrade your machine and end up with a whole bunch of things 
that don't work anymore.

That said... you can get various information about the PC... motherboard 
ID, BIOS checksum, hard drive serials, NIC addresses, etc. and munge 
them to generate a host string, then generate a complementary key which 
you can use to manipulate that string back to a decryption key to decode 
sections of your exe.  Every time the program runs it then checks the 
hardware, generates the host string, uses the key to create a decryption 
key and decodes the locked code blocks.

It's an idea anyway.  Problem with it is that any slight change in your 
configuration renders the program useless, or at least crippled.  It's 
fairly strong though.  If you used a reasonably strong crypto algorithm 
then it'd be extremely difficult to crack without at least one sample 
host/key pair to find the decryption key.

Just a theory.  Feel free to run with it :

Oh, and if you /are/ going to go with machine-specific copy protection, 
be nice and provide a way for people who register to easily update keys 
when they change hardware.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Copy protection/program registration

2003-11-11 Thread Corey Murtagh
Leigh Wanstead wrote:
It's
fairly strong though.  If you used a reasonably strong crypto algorithm
then it'd be extremely difficult to crack without at least one sample
host/key pair to find the decryption key.
No, it is not. Someone can use winice to debug to the point where you call
checking logic and just simply patch the executable with a jmp assembler
code to disable the logic. So strong crpyto will not work, no matter how
strong it is. That is just the basic lesson for training a skilled hacker.
The idea is that the program doesn't have a copy of the decryption key. 
 That key is constructed using the host string (hashed from the 
computer's signature data) and the registration key provided when the 
software is registered.  So if you don't have a host/key pair, no amount 
of debugging is going to get past the encryption.

And no, you can't just patch the checks, since important pieces of code 
are encrypted.  IE: the bits that do the stuff that is locked out of the 
shareware version, for example.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Copy protection/program registration

2003-11-11 Thread Corey Murtagh
Leigh Wanstead wrote:

SoftICE for Windows can debug any windows application. strace is pretty good
to print out any Linux application's api use. So there is nothing you can
hide from it. Windows assmebler debugging is easier than DOS, as win api is
documented.
Unless you can play a game with the hacker using a virtual stack, someone
will determine enough to know everything.
A competent deprotection specialist (yeah, flowery term, but 'hacker' is 
inaccurate and over-used) will eventually break anything you, I, or 
indeed anyone comes up with.  This has been proven time and time again.

Still fun to think about how to make it difficult for them, even if I 
never actually implement any of it :

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: bpl files

2003-11-09 Thread Corey Murtagh
[EMAIL PROTECTED] wrote:

Well, the Delphi\Bin might well be an option, since it will meet your
first criteria if Delphi has its Start In directory set to Delphi\Bin
which IIRC it does by default... ;-)
Actually I think I missed a step... I /think/ it checks the 
application's home directory as well, which is fine for Delphi... but 
totally not for programs written in Delphi.  Try running a program that 
expects a BPL in the Delphi\Bin dir from outside of Delphi.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Copy protection/program registration

2003-11-09 Thread Corey Murtagh
Ross Levis wrote:

Hi Stephen

You could just roll your own based on things like hard drive serial no., n/w
card mac address etc.
I'll do that.
The only problem with this, and any copy protection for downloaded 
programs, is the hardware upgrade issue.  Basically most methods license 
the software for use on a specific computer, and if the computer is 
upgraded and one of the key items is changed (new network card, or new 
hard drive, whatever), the software no longer works.

How about using a number of 'hardware id' methods, hash each separately 
with something like MD5 (except not that... but a good strong hash algo) 
and test them against the license for that machine.  If only one of them 
fails - because of a new HD, or whatever - warn the user and give them 
some way to update their registration.  If more than one don't match, it 
might be safe to assume it's been copied.

It's not a silver bullet, but it can save lots of aggravation for your 
users in the long run.  Imagine how you'd feel if you'd shelled out (for 
example) $100 on registering a program, use it a lot, then find that 
when you upgrade to a gigabit ethernet card the program suddenly stops 
working.

Moral: copy protection is a more complex topic than it first appears.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: bpl files

2003-11-09 Thread Corey Murtagh
[EMAIL PROTECTED] wrote:

Indeed, but the original question was where does Delphi expect to find
BPLs, not where does my-application-written-in-Delphi expect to find
BPLs. ;-)
I've found that a lot of people will phrase Where does my application 
written in Delphi... as Where does Delphi

Personally, for BCB, I have a networked drive where I store my BPLs, 
includes and so on, and it's on my path.  That way they can be found 
both by BCB and applications written in BCB.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: bpl files

2003-11-06 Thread Corey Murtagh
Paul Lowman wrote:

Hi all

Anyone know where Delphi expects to find .bpl files (apart form the system
folder) and can it be set?
Same as a regular DLL... in the system search path.  That is:

1) current directory
2) dirs in the PATH environment var
3) %WINDIR%\System32
And Myles: the Delphi\Bin dir isn't an option, unless it's in the path.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Schedule Tasks

2003-11-03 Thread Corey Murtagh
vss wrote:

um...never heard of Chron. So no. ;-)
CRON is the *nix scheduler daemon.  It has been around for quite a 
while, and is very configurable... once you understand the syntax :

If you have Perl installed, you could try CRONw on sourceforge:

http://cronw.sf.net or http://sf.net/projects/cronw/

It runs as a service, but I don't know how well ported it is.  There's 
also nnCron LITE:

http://www.nncron.ru

And, finally, on most versions of Windows there's the Scheduled Tasks 
system folder, accessible from the explorer or start menu.  It can be a 
bit touchy though... doesn't want to schedule tasks for me because I 
don't use login passwords for my main account (yeah, I know :)

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Schedule Tasks

2003-11-03 Thread Corey Murtagh
Jeremy Coulter wrote:

Not all versions of windows has the scheduler in it, and some sys admins
don't install it, and so its just easier to do it your self.like
most things :(
We have actaully found windows 2000 can corrupt the schedule settings
too. We can repeat this in about 80% of our servers, of which there are
130 of them. So it's a big problem at times.
MS are like, oh how strange  or if you read between the lines Oh
bugger not another one !! ...hehehe
If you're running WinXP, you can do simple scheduling using the 'at' 
command... but something like nnCron Lite is far more versatile.

Having said that... I did write a scheduler myself once.  The timing 
algorithm was fun :

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Groupboxes

2003-10-30 Thread Corey Murtagh
Alistair George wrote:

Hi all.
I have two groupboxes. I want to altop the inside (contained) one, but the difference
between the borders is too much at the top. How do I reduce this spacing?
Anchors of the contained are top and sides.
Or am I using the wrong component?
You can simulate the outer group box with a panel and a label, and the 
client area with another panel.  Set the border on the internal panel to 
what you like and put all the controls in there.  Or just one panel with 
a bevel perhaps?

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Tag

2003-10-29 Thread Corey Murtagh
gajo wrote:
snip
You get the idea. And here comes the problem: I cannot get the CI's Left or
any other property, because I cannot access it. Like this:
procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState;
  X, Y: Integer);
begin
with Sender do begin
  if (ClassType = TImage) then begin
newX := X;
newY := Y
  end else if (ClassType = TPeasants) then begin
newX := X + Sender.Left;   // ERROR
newY := Y + Sender.Top;   // ERROR
  end
end
end;
TObject is the root of the class hierarchy, and it doesn't know about 
the properties you're trying to access.  You'll have to cast the object 
reference 'Sender' to an appropriate form - one that knows about the Tag 
and Position properties, or one that has ClientToScreen for example. 
Casting to TControl should work in all cases.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Size of the mouse pointer

2003-10-26 Thread Corey Murtagh
gajo wrote:

The mouse pointer is always the same size, 32x32 I think. Is there a way to
create a much larger one? I actually want to create a circle with a cross in
it, so that it would show the range of effect of a mouse-click on some
objects. The size would be about 80x80
I don't think so.  I recently had to do a stamp-pad tool for a paint 
program and what with variable-sized stamps (user selectable) and 
different zoom levels I often had stamps that were much larger than the 
cursor, and in true color at that.  Since I had a ready canvas I just 
pre-drew the stamps to a TBitmap and then drew them in the right place 
on the canvas whenever I got a mouse message.  Was slow for very large 
stamps, but worked fine otherwise.  Is this an option for you?

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Size of the mouse pointer

2003-10-26 Thread Corey Murtagh
gajo wrote:

Is this an option for you?
Yeah sure, I just thought it could be done, cause it would make my program
look nicer :)
Well, if you find out how to do it... share :

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Single , double mouse click

2003-10-21 Thread Corey Murtagh
Alistair George wrote:

Hello Paul,
Ohhps dont forget if u use my code to reset the dblclck variable!
Or better, have the OnDoubleClick stop the timer.  No need for extra vars :)

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Dump the output of a DOS command into a Memo box

2003-10-18 Thread Corey Murtagh
gajo wrote:

How can I execute a DOS command, and then put the output into a Memo object?
For example,if I type dir in an EditBox, then the Memo should show me the
contents of the CurrentPath.
There used to be an example app (came with Builder 4 at least) which did 
that using pipes... called WinTools or something similar.  Grep for 
CreatePipe in the examples dir.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: SSH?

2003-10-15 Thread Corey Murtagh
Rohit Gupta wrote:

Pardon my ignorance here... but what is SSH ?  any relation to SSL ?
Yeah... Secure SHell.  It runs over Secure Socket Layer... which is what 
I assume Chris meant.

Short of using PuTTY to proxy a connection for you (which works fine for 
single-connection stuff like HTTP, remote control with VNC, connections 
to an SQL server, etc.) he'll have to look into one of the SSL libraries 
out there.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: [DUG-OFF-TOPIC]: octane

2003-10-12 Thread Corey Murtagh
Leigh Wanstead wrote:

C is really old language compare to java, .net. Given it a couple of years,
the speed of java, .net will be fine.
Quite seriously, no.

A well-written C program will outperform a well-written Java or C#/.NET 
program today, tomorrow, and for the forseeable future.  This will only 
change if/when hardware becomes available to directly support CIL or 
java bytecode... the mythical Java Processor for example.

By that view, I think Sun/Microsoft do a good job.
Sun has definitely done a damn fine job.  Microsoft I'm reserving 
judgement on.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: octane

2003-10-08 Thread Corey Murtagh
Phil Scadden wrote:

Short answer: YES!

My take on this situation is as follows:

1. Microsoft has already been bitten once having to support multiple
architectures (see Alpha and MIPS), and to avoid this problem in the future
(see x86-64 and IA-64) they hace created .NET as a platform neutral
environment.
Unless .NET can run a great deal faster than Java, then this is a
very risky strategy. A port of Linux to x86-64/IA-64 would allow developers
to create native applications (open office) that would run rings around
.NET applications compiled to CLR.
There's no reason to expect that CIL code /can't/ run at the same speed 
as Java bytecode.  They're the same basic concept, just a different 
implementation.

Where it might fall down is in the implementation of the VM and the crap 
added to CIL to support various look how much better than Java we are 
features.

Oh, and Java isn't 'native' at all, just in case you were confused about 
that.  Where Linux wins is that a huge amount of source code is 
available to allow you to recompile your favorite applications on a new 
platform, without having to wait for the author to release a 
platform-specific variant.  If the source /isn't/ available, you still 
have to wait.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: octane

2003-10-07 Thread Corey Murtagh
Paul Mckenzie wrote:
Windows initially sat on top of DOS...
The way I see it - .NET will eventually, somehow, become the platform itself
(maybe 64-bit).
At the moment .NET is primarily a Java challenger for the Windows 
platform... and others, once the various non-MS CIL/CLR implementations 
out there (Mono for example) mature.

After that... who knows?  Certainly there will still be an underlying 
platform to program against, but Microsoft could well limit that to 
drivers, if the whim took them.  I think there'd be a fair outcry if 
they did so however.

Personally, I have no interest in .NET as yet.  If I have to use it I
will, but until then... C++ Builder suits me just fine :
--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Slow email / xtra

2003-10-07 Thread Corey Murtagh
Robert martin wrote:

I wonder if it is related to any traffic travelling over their servers
though.  I just checked the xtra site they say.
snip
The fact that they are publishing the problem means it must be major.  Our
experiance with Jetstream is that they wont admit a problem but mysteriously
30mins later it fixes itself :).  I know Jetstream isnt xtra but there is a
rather close association.
I believe that Telecom reabsorbed Xtra, so yeah, Jetstream and Xtra 
/are/ the same company... or parts of at least.  Xtra is just the ISP 
portion of the Telecom networking division, or something along those 
lines anyway.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: octane

2003-10-07 Thread Corey Murtagh
Phil Scadden wrote:

Windows initially sat on top of DOS...
Initially. ?? Still does :-)
Win9x and WinMe do, yes.  And they're both virtually retired by 
Microsoft.  The WinNT line hasn't had anything much to do with DOS, 
except for the WoW core which allows DOS programs to run in a window.

The way I see it - .NET will eventually, somehow, become the platform itself
(maybe 64-bit).
As a bytecode interpreter? So I am going to write my services/databases
etc for a virtual machine? Something other than assembler has to hold this
thing together. I guess we could see the native OS as a collection of
web services (but boy, that adds a lot of layers) and have a mechanism for
writing native web services. 
There are already plenty of layers.  The HAL, the APIs, etc.  What's one 
more? :

Realistically though, I doubt anyone (except MAYBE Microsoft) really 
wants to see it go that way.  Programming on the metal is just too 
much a part of the development culture.  The day Microsoft tries to lock 
us into .NET is the day the hacker community starts finding ways around it.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: WinApi Encryption

2003-09-29 Thread Corey Murtagh
Rohit Gupta wrote:
Ah but Peter is biased and overly critical (like Max)  :-)
No, Peter is a professional cryptanalist.

I decided to use PKZIP professional version - much cheaper than 
my time of coding it and I cant be blamed for the security part of it..  
:-)
You don't have to code security yourself.  In fact, it's strongly 
advised by most (if not all) crypto people that you don't.  Get CryptLib 
or something similar and use AES, or whatever strong algorithm is 
suitable for your application.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: WinApi Encryption

2003-09-29 Thread Corey Murtagh
Rohit Gupta wrote:

Nicholas,

over the years many have made similar remarks (including Peter Gutmann), 
so far I havent seen any proof of anyone cracking it anyway - that 
standard encryption is always been regarded as basic.  Check out the web 
site www.pkware.com, click on products then select Professional Editon 
with secure desktop.  At $100 US, its cheap I just have to call the 
command-line version.  It also saves me writing a decryptor at the other 
end.
The pro version does have strong encryption, yes.  The same encryption 
you can get for free in various crypto libs as it happens.  The standard 
version's encryption isn't very strong, and can be cracked in a matter 
of minutes with a known-plaintext attack.  Brute force takes a bit 
longer, of course.

The alternative is to spend days just to download and try out various 
libs and appelets.
Or a couple of hours investigating encryption algos and finding a lib 
that supports the one that's right for your purposes.  All it takes is a 
little bit of research.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: WinApi Encryption

2003-09-29 Thread Corey Murtagh
Nahum.Wild wrote:
But if you spend more than $100 of your time investigating third party
encryption libs then which is cheaper?
Depends...

a) how many hours is US$100 for you?

b) will PKZip professional suit you /future/ encryption needs?

c) if, by doing the research, you learn something about encryption... 
how much is that worth?

Just my two cents worth. :o)
Hmm... if 'a few hours' is worth more than US$100, then by extrapolation 
this email too you... what, a few seconds? :

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: ImageList images

2003-09-26 Thread Corey Murtagh
Phil Middlemiss wrote:

I have a form in a DLL that has an action list and an associated image 
list. When I use the actions on toolbar buttons (or anything else, I 
think) - the images don't appear. The DLL form has it's own TApplication 
even though it's loaded into the same memory space as the main app and I 
hade to take that into account to pass on the On Idle event to the DLL 
so that actions could update their status. But I can't seem to get the 
image list to show. Any ideas?
The solution that worked for MDI forms in a DLL might work for you, if 
you're runtime-linking to the DLL.  When you load the DLL, initialize by 
replacing the Application and Screen variables with the ones from the 
host application (sent as params to the init procedure).  Save the old 
values and restore them before the DLL is unloaded.

This lets MDI forms work from DLLs, and might solve the problem you're 
having.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Form size changing/scrolling?

2003-09-18 Thread Corey Murtagh
Chris Veale wrote:

Hi all.

I have created a program that runs fine on desktop computers but when it is
run on laptops the forms do something weird and the user now has to scroll
them to see the full screen.
the first form I display is only 400 x 200 pixels but no matter what
resolution the laptop is set to the user has to scroll, even if its 1400 x
1080 resolution and the form is small in the center of the screen - without
having a need (technically) to scroll.
Can anyone suggest a solution to this?  I've never come across this before.
I've hit it recently, working in WinXP on some code that was developed 
on Win2K.  For the most part the forms are ok, except where I used 
Anchors to pin controls to the right and/or bottom of the form.  The 
problem turned out to be that the window framing is quite different on 
XP (using the default settings) than on Win2K, NT4, 98, etc. and the 
form stores the width and height of the form itself, not the client area.

The core of the problem is that the relationship between form size and 
client area is variable not just between versions of windows, but 
between different appearance settings and themes on the same version. 
On Win98 you can mess it up by changing the size of the title bar, etc.

The solution for me, after much messing around, was to stop using the 
Anchors property to position controls.  Using aligned panels gave 
(mostly) the same effect, with some OnResize code to fix the rest.

You might get away with using the form's BorderWidth and AutoSize 
properties to resize the form to fit the controls at runtime - in the 
form's OnShow method, toggle AutoSize on and off to have the form resize 
itself.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: SImple smtp agent

2003-09-10 Thread Corey Murtagh
[EMAIL PROTECTED] wrote:
Hi Neven

I've just been down this track and used ICS - Internet Component Suite (Aka
FPIETTE's Components). It's free :-)
Here are some sites:
http://www.overbyte.be
http://www.rtfm.be/fpiette/indexuk.htm
http://users.swing.be/francois.piette/indexuk.htm
The one gotcha I found was that the component would regularly report back
an error saying it wasn't ready, e.g. after sending one email and then
wanting to send another. I spent ages trying to find the answer on google
and ended up resorting to the following:
If you can, do it with events.  The ICS TSMTPClient component will tell 
you when the state changes.  Of course in some cases this means having a 
separate window to do things in, but that can be good too... a nice way 
to provide feedback.

If you need to do it synchronously, I believe there are various methods 
of the component that don't return until they succeed or fail.  I 
haven't used them though.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Comparing Times

2003-08-25 Thread Corey Murtagh
Sorry for the late reply - is it still the weekend if I haven't slept 
since yesterday morning? :

Jeremy Coulter wrote:
Hi All.
It must be the weekend or something, but I have 2 times I need to do a 
comparison on.
Basically I need to know this :-
 
Time_A=06:59:69
Time_B=16:00:00
 
TimeOf_event=00:05:00
 
Ok, now, if I go :-   If (TimeOf_event=Time_A) and 
(TimeOf_event=Time_B) then
  DoWhatEver;
 
Problem IS, this needs to return TRUE because the time of the event has 
to be within a time frame.
Infact, 16:00:00 is infact the START time of where the event must 
happen, and 06:59:59 is the FINISH time the event must happen before.
This is rolling over a day, so the above will never return TRUE.
Since 06:59:69 is numerically before 16:00:00, how about putting them 
into TDateTime objects with date values attached?  That sorts out the 
problem of your 'end' being before your 'start'.

Of course if this is a daily event, then yeah, it's probably better to 
go with the 'or' solution.  Logically speaking it's the same as:

  if not ((TimeOf_event  Time_A) and (TimeOf_event  Time_B))
DoWhatever;
... which reads If event time not between finish and start, and is a 
bit more self-explanatory... especially if you change the names of 
Time_A and Time_B, which are a little confusing in this context.  How 
about StartTime and EndTime?

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Kinda off topic

2003-08-21 Thread Corey Murtagh
vss wrote:

HI All.
I had to go visit a site yesterday as they had a strange error.
When I got there the had something like abcd  note the 2 dbl quotes 
at the end.
I thought, ah theres the problem.
I took the quotes out, saved the data, but when I went to put them back 
in, I did Shift ' and nothing happend so I did it again and got  !
did it again, same thing.
Someone said they have seen this in Windows 2K before, but dont know how 
to fix it.
Anyone else seen this and know how to turn it off??
It sounds like the text services input language feature.  Several 
non-english languages use commonly accented characters, and this can be 
done in several ways.

The most common is to use certain key sequences - such as Shift+' for 
umlauts.  So when you type a double-quote, it queues it and waits for 
the next keypress.  If that happens to be a character that can be 
accented appropriately, it emits a single character.  If not, it emits 
the double quote and whatever other character you typed... in this case 
another double quote.

Long story short... check out the input language settings in the control 
panel.  On XP you can find it in the Regional and Language Options 
control panel, Languages tab, Text services and input languages. 
Should be something similar in Win2K.

I don't know if it's possible to switch this off for specific cases in 
the VCL.  You might try fooling with the ImeMode in your edit controls, 
but more likely you'll have to do something with the text services API. 
 I'm guessing it'd be easier to tell the client to switch their text 
input language back to English.  If they don't want to (and they may 
have reasons), then it's up to them to deal with the problems it causes.

Incidentally, I did some transcription work from Maori earlier this 
year.  We found a Maori input translation which used the ~ as an accent 
for putting macrons over vowels.  We just switched input languages as 
necessary.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Some Ideas?

2003-07-30 Thread Corey Murtagh
vss wrote:

Hi All.
snip
Can anyone else suggest another alternative? other than Soap etc. as we 
cant really open ports up as the info is VERY sensitive. 
oh PS. the XML is also encrypted before it goes and decrypted on the 
client..BTW
There are a number of middle-ware possibilities, but I think the option 
using the webserver is a good one.  However, it's probably a good idea 
to just use a CGI rather than messing with COM.

Write a little program to dump the requested data to a stream in any 
format you like - coded XML, proprietary binary format, whatever - then 
write it out to the console with the appropriate HTTP content headers.

I've written WinCGI programs that send on-the-fly JPG images this way, 
and it works nicely.  As an added bonus, you can shift the whole 
shooting match to Kylix if you feel the need, without having to worry 
about the fact that COM is a MicroSoft-specific paradigm.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Some Ideas?

2003-07-30 Thread Corey Murtagh
vss wrote:

Some bright spark (me) just remembered we have a Citrix Portal that uses 
a Javaclient and needs nothing installed on the client machine (other 
than what it itself installs). we use it for others stuff, so it might be 
OK for this too.
So long as you have enough CPU grunt and bandwidth to support all the 
clients, it's a good option.  At the least it'll defer the problem :)

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: disabling alt-tab or ctrl-esc

2003-07-14 Thread Corey Murtagh
Moises Lopez wrote:

hi, is there a way of disabling either one of this under Windows 2000?

i already dropped the start button but the ctrl-esc key is still working.
You can disable/filter most key combinations using a low-level keyboard 
hook.  The exception is Ctrl-Alt-Del, which I believe is handled by 
windows before the low-level keyboard hook chain is called.  There's a 
few examples around of how to write something like this.

If you want to stop Ctrl-Alt-Del as well, you have to install a keyboard 
filter driver.  I have no idea how, but apparently it's explained in the 
Windows DDK.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Hotmail Email Viewer

2003-07-03 Thread Corey Murtagh
Ben none wrote:
Does anyone know how to build a email viewer which views email from a 
hotmail account in delphi?
I kinda figure that there is possibly alot of encryption with hotmail so 
its possibly better to read from a isp email account instead.
Actually HotMail is HTTP-based, and delivers data in an XML format.  I 
can't really tell you much more than that, since I only found that much 
by accident while browsing some sniffed packets.

Oh, and it's all in plain-text.  No compression, no HTTPS, etc.

Is it better or easier for me to read from a isp email account?
It's definitely easier to use POP3, since at least that is a) documented 
and b) standard.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: How to stop TDBCtrlGrid wrapping

2003-06-23 Thread Corey Murtagh
I want to use a TDBCtrlGrid for a form I'm designing, but the wrapping 
behavior is making things awkward.  I really need for Tab to exit the 
control once it reaches the end of the last record, but instead it wraps 
around to the first control in the last record's panel.  Same for 
Shift-Tab at the first control of the first record.

I know I could fix this by creating a descendant of TDBCtrlGrid, but 
that's really overkill for this situation.

Environment is BCB4, so any solution that works for the Delphi4 should 
be applicable here too.  Any help appreciated.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Virus Alert: Someone has a BugBear...

2003-06-10 Thread Corey Murtagh
Someone on the list is infected with a version of the BugBear virus. 
The latest message I've had claims to come from Jason Coley, but I think 
BugBear fakes its message headers so who knows?

The IP path on the latest message, from the message headers:

[200.57.141.30] smtp.telnor.net
[200.76.231.67] red-corpb38ADSL-67.telnor.net
In fact smtp.telnor.net resolves to a different address, and the given 
address resolves to nlproxy00.telnor.net, which casts doubt on the 
whole thing.  Possibly the latest BugBear is using open proxies for masking?

Anyway, everyone on the list should do a virus scan ASAP.  BugBear is 
NOT a nice worm.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: [Off topic] How to claim software source code exist beforePatent

2003-06-06 Thread Corey Murtagh
Leigh Wanstead wrote:
Hi Nicholas,

Thank you for your suggestion. What will help if I put cvs(version control)
data onto same cd? As that will give detail information about the time,
reason to make a souce code change.
The dated postmark on the envelope is legal proof, obtained from an 
independant and neutral authority (the post office), that your work 
existed at a specific date.  The post office is a credible 'witness' 
since they are legally bound against misrepresentation of any form, and 
in theory have no bias towards any entity.

Compared to this, the timestamps etc. in the CVS archive on the disk are 
NOT legally useful, since you could conceivably have altered them before 
writing them to the disk.  In other words, anything you claim about when 
you created the work is suspect without independant verification.

Example:

You've been working on a project for 2 years before you get around to 
using the poor man's copyright method of mailing the source (without 
CVS) to yourself.  A week later I get access to your CVS tree, copy it, 
alter the timestamps to before you started working, and mail myself a 
copy of the source with CVS tree.  We go to court over ownership... and 
you win, because your postmark is older than mine.

It's not necessarily so cut-n-dried, but that's the gist of it.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Path to Web Server

2003-06-05 Thread Corey Murtagh
James Sugrue wrote:

Does anyone know if there is an API call or similar to get the path 
(Win32) of the webserver installed on a machine?
There are various connection monitoring programs, especially personal 
firewalls, that can figure out which program a socket belongs to... so 
it must be possible.

As to how... you got me :

I suspect that there's a driver involved, although that's not 
necessarily the case.  You might consider asking someone like the author 
of NetPeeker if they'll let you in on the secret.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
   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]: Idle event

2003-04-01 Thread Corey Murtagh
- Original Message -
From: Alistair George [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 10:43 AM
Subject: [DUG]: Idle event


snip
 If anyone knows how to get OnIdle to work outside the Mainform PLEASE let
me
 know.

According to my documentation (BCB4, YMMV), OnIdle is an event of
TApplication.  In theory you can assign a handler to it from anywhere.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: Registry entries under NT,XP

2003-03-27 Thread Corey Murtagh
- Original Message -
From: Corey Murtagh [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 2:12 PM
Subject: Re: [DUG]: Registry entries under NT,XP
snip

 Store user-specific settings ing HKEY_CURRENT_USER and globals in
 HKEY_LOCAL_MACHINE.  That's pretty much the whole reason the registry is
 structured that way.

oops... my bad.  As other people have rightly pointed out, you have to have
admin rights to play around in HKEY_LOCAL_MACHINE.

Option the second: use a config file for global settings.  Quaint, maybe,
but YOU control it.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: Indy and Norton Anti Virus

2003-03-19 Thread Corey Murtagh
- Original Message -
From: Matt Dee [EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 3:34 PM
Subject: [DUG]: Indy and Norton Anti Virus


 For some reason any email sent via Indy's SMTP client gets 'cached' by
 Norton until the sending progam has been closed.  Other email clients work
 fine, and I've used this component (TidSMTP) before with Norton and had no
 problems.

 Anyone know anything about this problem?

 Cheers,
 Matt.

 (I simplified the code down to:

   idSMTP1.Connect;
   idSMTP1.Send( idMessage1 );

Wild guess time... are you disconnecting the component after the send is
complete?

Quite possibly Norton is waiting for the session to close before forwarding
the message(s) on to the real email server.  If you don't implicitly close
the session by disconnecting, then it will likely stay open until the
application exits.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

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

2003-03-18 Thread Corey Murtagh
- Original Message -
From: Neven MacEwan [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 10:28 PM
Subject: [DUG]: PostMessage


 Hi all

 In my app I have a whole lot of forms which are embedded in a page control
 of the 'Main Form'
 If one one these forms wants to notify all other forms in the app of a
 change, what is the best way to do it?

 Iv'e tried

   PostMessage(HWND_BROADCAST, WM_APPDATACHANGE, 0, 0);

 but none of the other forms seem to get this message, is this because I
 really only have 1 form in my app?

From the Platform SDK:

HWND_BROADCAST - The message is posted to all top-level windows in the
system, including disabled or invisible unowned windows, overlapped windows,
and pop-up windows. The message is not posted to child windows.

I would assume that your windows, embedded as they are, do not qualify as
'top-level' windows.  I'm a little hazy about exactly which windows DO
qualify, but I assume they're all those that have a null parent.  However,
since the message gets sent to ALL top-level windows, not just those in your
application, it's likely to be of little use to you.

You might want to consider writing a method or message handler for the main
form that forwards the message on to each of the embedded windows.  There
are probably other ways to handle it, but it depends on your implementation
I guess.  Message forwarding via the main form is the simplest method I can
think of.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: Help - I need Help!

2003-03-04 Thread Corey Murtagh
- Original Message -
From: Alistair George [EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 1:31 PM
Subject: [DUG]: Help - I need Help!


 Hi all.
 Can anyone point me in the direction of a BMP icon same as BIHELP icon in
 Windows.

You can create one yourself using the Marlett font.  It contains most of the
symbols used for standard system buttons, including minimize, maximize,
restore, close, help, combo, etc.  You might want to try making a large
bitmap (say 64x64), font size 36 or so, then shrink it to antialias the
symbol.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

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

2003-02-03 Thread Corey Murtagh
- Original Message -
From: Andreas Toth [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 1:41 PM
Subject: RE: [DUG]: fileopenmode


 For your information, the system doesn't let me copy this file (using
 Explorer) under Windows 2000 either. I would say the system has placed an
 exclusive lock on it.

 I don't think there's much you can do to access this file short of booting
 up under Linux and mount the partition containing the locked file(s) and
 copy it that way. Another option would be to Ghost the drive and use Ghost
 Explorer to get access to the file...

The Backup program they're using in WinXP gets around the problem of locked
files by using the Volume Shadow Copy Service.  I haven't found anything yet
about the API for it, but from the various blurbs I've seen so far it looks
like a useful tool.

Unfortunately I have no information on how much HD space it takes to make a
shadow copy, or what the API is, or anything else.  Might be worth
investigating though.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: Disable Floppy in Registry

2003-02-02 Thread Corey Murtagh
- Original Message -
From: Jeremy Coulter [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 7:40 AM
Subject: RE: [DUG]: Disable Floppy in Registry


 Thanks for that Dave.
 I looked at the registry, but I don't have about 98% of these entries in
 my registry unfortunitly.
 My susspicoin is tho, the NoDrives=dword:0100 is the line that
 will do it.
 I will have a look at my machine at work, and see if it has some of
 these entries.

Here's something from one of M$'s books (sample chapter online at
http://www.microsoft.com/mspress/books/sampchap/6232a.asp ):

Hiding drive letters in Windows XP doesn't prevent users from accessing
those drives through other means, including at the MS-DOS command prompt.
This setting hides only those drives in Windows Explorer, the common dialog
boxes, and so on. Thus, you can't rely on this as a security measure.

I think to properly disable a drive in Windows of any form you'll have to
figure out how the Device Manager disables hardware.  The user can still
enable it through the Device Manager, but they have to know that.

After some testing on WinXP, it seems as if there is no single value change
that will disable the drive ala the Device Manager.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: Disable Floppy in Registry

2003-02-02 Thread Corey Murtagh
- Original Message -
From: Jeremy Coulter [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 8:53 AM
Subject: RE: [DUG]: Disable Floppy in Registry

snip
 They want an app. That will read the floppy, but only in that app.
 I have not felt too comfortable about this project.
 Might just say nah, not interested :-)

So they want to disable the floppy drive for anything other than your app?
Not simple.

About the easiest way (and it's not so easy, I assure you) I can think of is
to hook certain APIs and check for applications targetting the floppy drive.
There are various SDKs available for doing system-wide API hooks, but
they're not free... at least US$499 not free.

There's an article on API hooking, with a variety of handy links, here:

http://www.internals.com/articles/apispy/apispy.htm

hth.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: Patch Maker

2003-02-02 Thread Corey Murtagh
Color me interested :)

Especially interested in a binary distribution, since I don't use Delphi.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
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]: Disable Floppy in Registry

2003-02-02 Thread Corey Murtagh
Ok, so now I get to tell myself how wrong I am.

One of the links in that article was to a library one of the M$ research
guys created, called 'detours'.  I grabbed it and got it to build under
BCB4, and it seems to work fine under WinXP.  It apparently doesn't work at
all under Win9x/Me, so if that's one of your target environments then this
won't help much.

Detours works quite simply for the current process, but for other
processes - new or existing - you have to do some extra work.  It does
provide routines for doing it, but they're a touch more involved.

You might want to check out http://www.madshi.net - he has some
reasonably-priced (free for non-commercial use) stuff that implements API
hooking on most Win32 platforms, and it's all Delphi.  Might be the solution
you need if you want to go through hooking APIs.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

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

2003-01-31 Thread Corey Murtagh
- Original Message -
From: Alistair George [EMAIL PROTECTED]
Sent: Friday, January 31, 2003 1:35 PM
Subject: [DUG]: fileopenmode


 Hi all.
 Using NT/XP and trying to do a backup, there is a fileopen error even
though I
 have defined the following:
 fileopenmode:=fmOpenRead or fmShareDenyNone;

 Is there any way around this??

The share mode affects the rights that other programs have when they try to
open the file AFTER you do.  If another program, or the system, already has
the file open in exclusive mode then you can't do much about that.

David's solution is about the best.  Making a copy of the file is about the
simplest way to get at the data.  Copy it, read the copy into your backup
with the same details (filename, attribs, etc) as the original, then kill
the copy.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: API to access phisical memory

2003-01-28 Thread Corey Murtagh
- Original Message -
From: Dedy Darmayanto
Sent: Monday, January 27, 2003 2:10 PM
Subject: [DUG]: API to access phisical memory

 Hi,

 I've written EXE ini D6 that access phisical memory at $F until
$F.
 When it run on win98 is Ok, but on WinNT or Win2000 an error was occured.
 So to access phisical memory WinNT or Win2000 should be used API.

 Has anyone an example using API to access phisical memory.

As far as I know there is no standard, approved way to do this, since no
well-behaved program should ever access memory outside of the space
allocated to it... except under special circumstances.  I believe you need
to write a driver to do this, since only Ring0 code can bypass the memory
security used by WinNT/2K/XP.

Why do you need access to the system ROM area?

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: C++ Name mangling

2003-01-06 Thread Corey Murtagh
Hi Phil,

I'm sorry to be the bearer of bad tidings, but there's a lot more to lib
files than just coff/omf formatting.  The object files inside need to be
linked against the correct runtime (probably MS's C++ RTL in this case),
etc.  It's not just a matter of getting them in the right format for
Builder.  The documentation's claim that the libs are 'usable by any win32
C/C++ application' is, unfortunately, bogus.

Generally if you have a lib-only distribution, it is specific to a
particular compiler... or at best, family of.  You'll have to find something
else that does what you need, or beg the people that wrote it to produce a
DLL version or open the source to you so you can build the lib yourself.

On the other hand, if the lib is just an interface to a DLL, then you can
use implib.exe to create a borland-compatible library for it.  The library
will handle run-time linking to the DLL, so you just have to have the DLL
somewhere the app can locate it at run - same dir as the exe, or installed
to the windows\system, or whatever.

HTH.

(And who knew I'd actually get to answer a question about MY favorite
compiler here? G)

- Original Message -
From: Phil Middlemiss [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 11:52 AM
Subject: Re: [DUG]: C++ Name mangling


 Max,

 while trying that, I discovered that the lib file that was generated by
 coff2omf resulted in a 1kb file from a 62kb file so it obviously didn't
 work. So, then using tlib (the borland equivalent of MS's library utility)
I
 tried to examine the .lib file. But tlib says that there is a bad header
in
 the lib file which I am assuming is just a compatibility issue.

 The documentation for the lib files says that they should be usable by any
 win32 C/C++ application. So I'm thinking there must just be a switch or
 directive to somehow get C++Builder to use it properly. The header for the
 lib file has the routine defined as:

 extern C {
   extern int __cdecl mobileCreateConnection(LPTHIS_CONNECTION connection);
 }

 Regards,
 Phil.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Displaying text.

2002-12-18 Thread Corey Murtagh




  - Original Message - 
  From: 
  ColinMina 
  
  To: Multiple recipients of list delphi 
  
  Sent: Thursday, December 19, 2002 4:32 
  PM
  Subject: [DUG]: Displaying text.
  
  Hi folks,
  
   Some help please.
  
   I need to create a text area on a form 
  into which I can write characters received from a com port. Getting the 
  characters is not a problem I can put them 
  intoan edit box but it doesn't suit because it fills up to the point 
  where I can't see them any more.
  
  I figured it would be easiest toput a 
  memo box on and use that but obviously I dont know what I doing.
  
   I don't mind how it's done 
  butpreferably the characters would just 
  keep scrolling in at the bottom of the text, and overflow intoanother 
  line at say 80 chars. cr and 
  lf would do their thing. Maybe tell me how to (optionally) clear the 
  text area as well.
There's a terminal component in the ICS distribution 
that would probably be better suited, but if you don't mind the peculiarities of 
the memo then try it with word-wrap enabled and just a vertical scroll 
bar.

--Corey MurtaghThe Electric Monk"Quidquid 
latine dictum sit, altum viditur."


Re: [DUG]: Suppressing exception popups in certain parts of code.

2002-12-11 Thread Corey Murtagh
- Original Message -
From: Andrew Thomas [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 4:00 PM
Subject: RE: [DUG]: Suppressing exception popups in certain parts of code.


 That still causes the annoying 'Exception' popup though. :(
 I thought maybe there was a compiler directive or something you could use.

From what little I've been able to find out/deduce about the debugger's
exception handling, it hooks at a very low level.  This means that apart
from session-wide debugger settings, it's probably not possible to modify
which exceptions the debugger reports.

Would be nice if there were.  Maybe a feature request to Borland? :)

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]:changing compile conditions at runtime...

2002-12-05 Thread Corey Murtagh
- Original Message -
From: Chris Veale [EMAIL PROTECTED]
Sent: Friday, December 06, 2002 11:33 AM
Subject: [DUG]:changing compile conditions at runtime...


 Hi

 I want to implement something like a passcode that when entered allows the
 user to do something different than a user without that passcode.  I have
 all the functionality already in the code with compile conditions but from
 all the help Ive looked through, I cant change this on the fly - it takes
a
 full recompile.

 Is there any way of allowing this change at runtime using compile
conditions
 or am I going to have to rebuild the functionality with if statements?

The compile-time conditions alter the code that is produced, so any
condition that isn't met effectively comments out the code it encloses.  If
you want to offer variable functionality dependant on a code, user level,
etc. then you'll have to write the logic for it into your code.

How to go about it depends on a variety of things, including how much
difference there is between one level and another.  If you have only two
states that differ only in a few lines of code, then a conditional statement
is probably sufficient.  For a more complex difference (additions to the
interface, completely new functionality, etc), and if you use a reasonably
OO design, you could derive a higher-functionality object from the standard
interface, add whatever you need, then instanciate the one that fits the
current user level.

Remember KISS though.  If you don't need to change much, do it the simplest
way you can - which usually means conditionals in your code.

Final thought: if you want the REALLY complex way, how about implementing
the enhanced functionality in a BPL, and only distribute that to people who
need it.  Same as deriving from a common object, but with added security in
that people who don't have the BPL can't get access to the extra functions,
no matter how they try to hack the program.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: On Click event not happening

2002-12-04 Thread Corey Murtagh
- Original Message -
From: Mark Howard [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Thursday, December 05, 2002 3:55 PM
Subject: Re: [DUG]: On Click event not happening


 Hi

 Further to this and my last post, I have just discovered that if I put a
 breakpoint on ANY code anywhere it gets disabled on run and does not
 capture the flow.

 I must have inadvertently set some global switch that turns this facility
 off.  (This must be easier!)

One thought... Builder occaisionally gets confused about which open files
actually belong to the project.  Even though it compiles and so forth
without problem, it doesn't recognize the file as being debug source.
Normally it has the full path to the file in the edit window's title bar,
rather than just the filename.

Try closing all open files in the editor window, check your build options
for debug settings, reload Delphi and do a full build.  It may or may not
fix the problem.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.


---
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]: Sending a record to a C++ DLL

2002-11-17 Thread Corey Murtagh




  - Original Message - 
  From: 
  Phil Middlemiss 
  
  Sent: Monday, November 18, 2002 3:32 
  PM
  Subject: [DUG]: Sending a record to a C++ 
  DLL
  
  Hi all,
  
  how do I determine which alignment to choose for 
  a record that will be sent to a DLL compiled from C++ ? I have the source code 
  for a test app that uses the DLL but I don't know enough of C++ to work out 
  how to send a record to it. Here is a typical structure:
  
  typedef struct 
  EscCoordinateTag{short Degree;short 
  Minute;float Second;} ESC_COORDINATE, 
  *LPESC_COORDINATE;
  Some structures contain other structure types 
  also.
From what I understand of structure 
alignment, it only pads the structure when a member would be placed somewhere 
that isn't an even multiple of its own size, or the alignment value whichever is 
smaller. So that structure should have 
offsets 0, 2 and 4 for Degree, Minute and Second respectively and a size of 8 
bytes.

Assuming structure alignment is 
4:

struct SExample{
 short foo;
 int bar;
};

...will have a size of 8 bytes, with 
offsets of 0 and 4 for foo and bar respectively.

Hope this helps.

--Corey MurtaghThe Electric Monk"Quidquid 
latine dictum sit, altum viditur."


Re: [DUG]: Execute and wait

2002-11-10 Thread Corey Murtagh
- Original Message -
From: vss [EMAIL PROTECTED]
Sent: Monday, November 11, 2002 3:07 PM
Subject: [DUG]: Execute and wait


 Hi All.
 I have a bit of code that does an execute and waits for the app. to
 close.
 What I want to do is execute a game and know when its finished, BUT when
 I use my code, it starts to execute the app, but then it stops and
 returns an error code of zero which means its finished...BUT it never
 started.

Your code looks basically ok.  It's similar to code I've written before for
similar purpose.

Since the app you're trying to run isn't, can you confirm that
CreateProcess() is returning a non-zero value?  If not, check for whitespace
in your application path that might be misinterpreted by CreateProcess()
while it's searching for the exe name, and wrap the name in quotes if
necessary.

Also, your application may be failing to start because you haven't provided
the correct current directory for it.  You could do an ExtractFilePath(Path)
into a string, then pass a PChar from the string as the lpCurrentDirectory
parameter to CreateProcess().

Apart from that... can you give any more information?

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Best version control system?

2002-11-10 Thread Corey Murtagh
- Original Message -
From: [EMAIL PROTECTED]
Sent: Monday, November 11, 2002 2:55 PM
Subject: RE: [DUG]: Best version control system?


 Thanks for the comments. I'm having a play with FreeVCS and FTPVCS to see
 what they're like. I'll let you know **my opinion** of which is the best.

Check out WinCVS as well.  I've been using it (with BCB4) for a while now,
and it does a reasonably good job of demystifying cvs.  And since I use ssh
tunnels (via putty) to access my cvs server outside of work, it's about
secure as you could ask for :)

You can find WinCVS at http://wincvs.org or http://cvsgui.sourceforge.net

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Version Control

2002-11-03 Thread Corey Murtagh




  - Original Message - 
  From: 
  Paul Mckenzie 
  
  To: Multiple recipients of list delphi 
  
  Sent: Monday, November 04, 2002 8:53 
  AM
  Subject: [DUG]: Version Control
  
  This is possibly a bit off-topic !
  
  Having just donemajor release we are 
  re-looking at our version control...
  
  Is there a better way of maintaining development 
  and production source code ?
  What we are doing is Branching and putting any 
  "Production" bug-fixes into both branches and "Development" stuff into the 
  Development Branch only.
  There isscope for errors (leaving out a 
  bug-fix orputting in two different bug-fixes, etc)
  
  Any ideas, thoughts, what we do's, what we should 
  do's much appreciated...
I've been using cvs for a while now (using 
WinCVS to simplify things) for my BCB source, and recently I've been 
investigating the Branch handling. It seems you can do all sorts of fun 
things with CVS like merge between branches, etc. In theory, although I 
haven't tried it, that means you can fork your source into any number of 
branches and mergechanges back into the main branch on a file-by-file or 
project-at-once basis. That means you don't have to manually replicate 
bugfixes... although you may have to manually solve merge conflicts that cvs 
isn't bright enough to do by itself.

Ultimately though it still comes down to 
having a decent source documenting process for each branch. You need to 
track exactly what has been patched where so that you can later track missing 
bugfixes in the root branch.

--
Corey MurtaghThe Electric Monk"Quidquid latine 
dictum sit, altum viditur."


Re: [DUG]: Icons .res file OR making the correct icon appear on the components bar

2002-10-19 Thread Corey Murtagh
From memory (and this is playing with BCB a while ago) you include the
resource file in the project when you build the package.  The icon is loaded
by Delphi (or BCB) when it opens the package, as opposed to other resources
that are linked at runtime when you're not using run-time packages.

I think.  Your milage may vary :

- Original Message -
From: Alistair Grant George [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Saturday, October 19, 2002 2:27 PM
Subject: [DUG]: Icons .res file OR making the correct icon appear on the
components bar


 Hi all.
 Been down this track before but it has gone down the gurgler due to too
many
 suds.
 Recall that to include the icon with a build new component it must have
the same
 name in the image editor as the pas file eg TALISTAIR in capitalise.
 But say I install a package eg  SuperCompress.dpk how is there a link
between
 the package and the desired icon resource (.RES). (I know, it is no big
deal but I like to see
 the various icons!!)
 Have tried everything I can think of but still end up with default.
 Al+


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

2002-10-09 Thread Corey Murtagh

- Original Message -
From: vss [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Wednesday, October 09, 2002 10:43 AM


 yeah, that went thru my mind, but it seemed a bit of a manky way of
 doing itok well I will try it non the less.

TWindowControl descendants have their own windows canvas, but paint boxes
and other TGraphicControl descendants share the windows canvas of their
parent.  So anything you put into a TPaintBox (for example) will overwrite
anything that you previously drew in another overlapping TPaintBox.

The solution is to redraw the background to erase the existing text.  If
it's just a static color then fillrect is the solution, otherwise you'll
have to redraw the background image that occupies the same rect as the text.

Of course if the background is just a static color then the simplest thing
to do is use a brush style of bsSolid with the appropriate brush color and
use TCanvas.TextRect to write the text out.  That will clear the rect and
draw the text in one operation, which reduces flickering.

It may not be elegant, but it's the way it is.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: IP addresses

2002-08-26 Thread Corey Murtagh

- Original Message -
From: Kevin Parker [EMAIL PROTECTED]
Sent: Monday, August 26, 2002 9:45 PM
Subject: [DUG]: IP addresses


 Hi  all

 I have an app with an indy client and servers.  The client polls server
 app's on every mc in a network.  My problem is how do I get a list of all
 the currently routable IP addresses in the network?  I need an answer for
 both static and dynamic IP address allocation.

If all of the IP addresses are on the same subnet then you can send a UDP
packet to the broadcast address.  Anything on that subnet that is listening
for the packet should reply, giving you a map of active clients.  You may be
able to broadcast a ping-type packet to find all machines, or you may have
to write support for your own broadcast ping into the client.

The problem with this method is that you generally (if the network's router
is configured correctly) have to do it locally.  This means that if your
client apps have to be able to do it remotely then you'll have to have a
local machine do it for them and maintain a list they can query.

Another method, if you just need a list of servers, is to have each server
contact a list holder on a static IP address when they start and
periodically while they're running.  If it's internal then you can make the
period smaller - say 20 seconds for example.  If a server misses more than
one checkin then it can be removed from the list.  This way you can tell not
only if the computer is up, but also if the server is running or not.

There are other options, some using lower level networking stuff that I'm
not familiar with, but I guess it depends on what you're trying to achieve.
The central server option is useful in that it reduces the number of packets
that have to cross your internet gateway/router/whatever, but really it's
most useful for internet clients.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: Overriding and Inheriting Function Methods

2002-08-20 Thread Corey Murtagh

- Original Message -
From: Andreas Toth [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 3:17 PM
Subject: RE: [DUG]: Overriding and Inheriting Function Methods


 I forgot to state that if I add the name of the function after inherited
it
 works, but why?

I would guess, without an in-depth knowledge of how Delphi's 'inherited'
keyword works, that your original assumption about it always being a
procedure call was close to the mark.  Either that or it's doing something
wierd with object/reference types behind your back... which is something
I've always suspected Delphi of, to be honest.

When you insert a 'inherited.method' call though it's treating 'inherited'
as the class your subclass descends from, so it's a proper
function/procedure call depending on the method.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: Strange TTimer/ShowModal behaviour (kylix)

2002-08-20 Thread Corey Murtagh

- Original Message -
From: Mark Derricutt [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Tuesday, August 20, 2002 9:07 PM
Subject: [DUG]: Strange TTimer/ShowModal behaviour (kylix)


 'lo all, have a strange problem afflicting a kylix 2 application.

 Take a project with 2 forms, Form1  Form2, put a TTimer on Form1, and
give
 it the following code:

   procedure TForm1.Timer1Timer(Sender: TObject);
   begin
 Form2.ShowModal;
 Caption := 'Boo';
   end;

 Form2 displays, but shortly afterwards, about a second, Form1's caption is
 set to Boo, whilst the modal form is still displayed.

Your timer will continue to tick after the ShowModal.  The next time (and
every time) the timer fires it will fail on ShowModal (because the form is
already visible), and go on to set the caption of Form1.  I'd suggest
disabling the timer before calling ShowModal.

 I've just tried the exact same thing under Delphi 5, and shortly after
 Form2 is displayed, I get an exception saying EInvalidOperation with
 message 'Cannot make a visible window modal.

This is probably more correct behavior than Kylix, but it's probably a
difference between the basic component implementations.  I would call it a
bug, but I couldn't say for sure whether it was a bug in Kylix or Delphi.

 I noticed that Form2 was still in the AutoCreate list, removing it, and
 creating/freeing a TForm2 instance in the timer solved the problem in both
 the Delphi and Kylix versions.

Really?  I would think that you'd end up with multiple visible copies of the
form, all modal.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: Emailing out of Delphi - now it works!

2002-08-08 Thread Corey Murtagh

- Original Message -
From: [EMAIL PROTECTED]
Sent: Friday, August 09, 2002 11:05 AM
Subject: [DUG]: Emailing out of Delphi - now it works!


 Hi all,

 I had a query a week back about some PCs not working, while others did,
when
 it came to emailing. I got an Interface not supported error. I've tried
 all sorts of things, including looking at the registry and attempting to
 re-register dlls.

 I now have my solution, and thought I should share it in case others come
 across this. We simply re-installed Outlook 2000 on a problem PC and hey
 presto, Delpi could email out with no problems. So something was
corrupted,
 and the re-install fixed it.

I presume this means you're using MAPI to do you email.  I've always avoided
this, at first because I thought the interface was just ugly, then because I
didn't want to have to load another program to do the transport.

There are plenty of components available that will handle the entire email
process without resorting to MAPI, and they will NEVER fail because of a
corrupt installation of Outlook.  How (or if) you use them is of course
entirely up to you :)

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: File Export Speed

2002-08-08 Thread Corey Murtagh

Message
 - Original Message -
 From: Paul Heinz
 Sent: Thursday, August 08, 2002 6:15 PM
 Subject: RE: [DUG]: File Export Speed

 Corey wrote:
   - Original Message -
   From: Myles Penlington
   Sent: Wednesday, August 07, 2002 10:20 AM
   Subject: RE: [DUG]: File Export Speed
  
   This string concatenation will be very slow - it is a
   N squared algorithm for the number of bytes copied ie
   bad news.
 
  Not quite that bad.  AFAIK Strings allocate memory a
  block at a time... but it's still pretty bad.  I wrote a
  program that passed Strings down a recursive tree
  search, then rewrote it using PChars and got a major
  speed increase... run time went from an average of 2
  minutes to a little over 18 seconds.  Definitely worth
  the extra coding effort.

 Yes, it is an O(N squared) algorithm since each string
 concatenation will require an extension which means
 allocating a new bigger string and copying the result
 over. Copying the string will take an amount of time
 proportional to the current length (a function of N) and
 this will be done a number of times that is a function of
 N. Hence, overall O(N squared) where N is Rows * Fields.

Seems I was wrong.  I stepped through the asm code in System.pas, and it
does indeed reallocate the string's memory every time you add to it.  If the
string happens to be in a space it can grow into the memory management
simply extends the allocated buffer, otherwise it will allocate a new buffer
and copy the contents of the string to it then append the new string.  So it
has a non-predictive order approaching O(N^2), or possibly O(N^2log(N)) for
extreme memory fragmentation.

I think perhaps I was getting confused with TMemoryStream, which does
allocate (in BCB4 at least) in blocks of 8k.

 Change the code to write each string field independently
 (i.e. avoid concatenations) and the algorithm will run
 much faster and still offer text output. Some buffering on
 the TFileStream may help as well to avoid many small
 writes but the OS should do a fair job of that for you.

I agree.  String concatenation is not required in this case, and just wastes
time.  Writing directly to the stream, with or without a buffer of some
sort, should be significantly faster.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: mis using pointers

2001-11-15 Thread Corey Murtagh

Well, I do dabble.  Kind of have to if I ever want to figure out what the
VCL or any of the third-party components I use does... or, more importantly,
why it's NOT doing things the way I think it should.  And sometimes a
general knowledge issue comes up here that I can insert my $0.02.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

- Original Message -
From: Neven MacEwan [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Thursday, November 15, 2001 2:05 PM
Subject: Re: [DUG]: mis using pointers


 Labels LabelshmmWhy are you lurking on the D list? ;-)

---
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]: mis using pointers

2001-11-14 Thread Corey Murtagh

They're both the same size (32-bit), so casting between the two shouldn't
cause any problems.  As long as nothing is then trying to dereference the
resultant pointer, no worries.  TList is quite good about this, so you can
use it to store integer values.  I've used this in the past to store integer
tokens in a TList of pointers to act as markers.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

- Original Message -
From: Neven MacEwan [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Thursday, November 15, 2001 12:12 PM
Subject: [DUG]: mis using pointers


 Hi

 I know you'll all leap on theis one but can I cast and integer to a
pointer?

 So I can so List.Add(Ord(Screen.Cursor)), where list is tlist


---
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]: mis using pointers

2001-11-14 Thread Corey Murtagh

Oh, sorry.  But it's not really what you asked :)

Be careful what you ask for - you just might get it. - Unknown Wise Person

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

- Original Message -
From: Neven MacEwan [EMAIL PROTECTED]

 Thanks John :-)

   I was about to lose hope that someone was goint to point out the obvious
 (which is what I required)


---
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]: mis using pointers

2001-11-14 Thread Corey Murtagh

Umm... is now a good time to remind people I'm a C++ programmer?

/me runs and hides

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

- Original Message -
From: Neven MacEwan [EMAIL PROTECTED]

 Corey

 You are right but i did give a code snippet List.Add(Ord(Screen.Cursor))
 That wouldn't compile


---
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]: How to send HTML format email using Simple Mapi?

2001-11-12 Thread Corey Murtagh
Title: How to send HTML format email using Simple Mapi?



Not with MAPI, but I've done it with the SMTP 
components from ICS, and I'm sure Indy has something that could do it. Is 
there any particular reason why you want to go through MAPI for 
this?

--Corey MurtaghThe Electric 
Monk"Quidquid latine dictum sit, altum viditur."

  - Original Message - 
  From: 
  Tom Munro Glass 

  To: Multiple recipients of list delphi 
  Sent: Tuesday, November 13, 2001 10:24 
  AM
  Subject: RE: [DUG]: How to send HTML 
  format email using Simple Mapi?
  
  I 
  think you might be on the right track with having to use multiple attachments, 
  but there's some vital bit of information I'm missing to do with defining the 
  Content Type.
  
  Has 
  anyone else done anything like 
this?


Re: [DUG]: More discoveries about actions

2001-11-11 Thread Corey Murtagh

This is normal.  If you hit both buttons together then you'll still generate
two keypresses, one for each.  The first one will execute the action, and
the other will sit in the event queue until something asks for it.  In the
first case, where you're just setting the value of a label, the next check
of the event queue will cause your other action to fire.  In the second case
the event queue will be polled by the message box, which will most likely
discard the other keypress as being irrelevant.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

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

2001-10-16 Thread Corey Murtagh

- Original Message -
From: Steve Galyer [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 8:34 AM
Subject: Re: [DUG]: TNMSMTP


 Thanks Patrick  Nello but unfortunately neither of your suggestions are
 true. I have tried this approach already, anyway Outlook Express does an
 automatic dialup every 30 minutes which would suggest that these settings
 are OK. The problem occurs on several machines that I have tested under
Win

Not necessarily.  OE actually dials the connections by making calls to the
RAS API.  It doesn't rely on your connection settings being correct.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Contracting issues - Comments please

2001-10-14 Thread Corey Murtagh




  - Original Message - 
  From: 
  Bob Osborn 
  
  To: Multiple recipients of list delphi 
  Sent: Monday, October 15, 2001 9:56 
  AM
  Subject: Re: [DUG]: Contracting issues - 
  Comments please
  
  If you went to Accessdatabases andVB 
  or VC++ you'd probably use ADO - and in my opinion Delphi handles ADO more 
  elegantly than VB does (don't know about VC) so 
  youhave another alternative

Visual C++ is a complete misnomer - nothing is 
easier in that than any other development environment. In fact more often 
than not it's a harder to achieve anything in it than just about every other 
env, unless you're happy to use the bug-ridden MFC classes.

--Corey MurtaghThe Electric 
Monk"Quidquid latine dictum sit, altum viditur."


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

2001-09-30 Thread Corey Murtagh

Try this link:
http://www.123.co.nz/docs/borland%20rad%20seminar.doc

For future reference people, if you're going to paste a link with spaces in
it, could you please convert them to %20s to avoid this sort of confusion.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

- Original Message -
From: Robert Martin [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Monday, October 01, 2001 4:21 PM
Subject: Re: [DUG]: Borland RAD Seminars - Ak, Wgtn, ChCh


 The web site you link to points nowhere.  www.123.co.nz seems to be
somesort
 of unfinished web site.  Could you pot the correct address plse.


---
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-09-11 Thread Corey Murtagh

- Original Message -
From: Stephen Barker [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 5:26 PM
Subject: [DUG]: BorCon


 Anyone going this year?

 The rego fee has risen substantially: $1464 (user group rate).

Whoa... why so much?  I've never been to one, but is it worth the price
tag??

 There doesn't appear to be any product discount this time either :(

And I guess not much chance that they'll be handing out free software to
everyone :

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: DIBs et al

2001-09-10 Thread Corey Murtagh

- Original Message -
From: James Sugrue [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 3:08 PM
Subject: [DUG]: DIBs et al


 What is the easiest way to get a Bitmap in a TImage to print the same size
 as it is on screen? I tried passing it to a TMetaCanvas but I must have
been
 doing something wrong as it printed very small.

The size that the bitmap will print is dependant largely on the DPI setting
of the printer.  If you have a 300x300 pixel bitmap, and a 300DPI printer,
then expect a 1-inch square output image.  You should be able to fix this by
upping the image size by stretching it when you draw to the printer canvas.
Exactly how much you stretch will depend on the printer settings.  If it's
300DPI then you might want to stretch it by (using standard screen
resolution of 96DPI) 300/96 = 3.125.  So your 300x300 pixel image is
stretched to 938x938 - or 3.125 inches square.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Should be Offtopic but....

2001-09-01 Thread Corey Murtagh

- Original Message -
From: NIRAV KAKU [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Saturday, September 01, 2001 6:19 PM
Subject: Re: [DUG]: Should be Offtopic but


 Interesting. But doesn't the caller ID come from the telephone
 company? As in, if they wish they, could they stop it? Here in
 INDIA, we have CLIP too BUT you have to pay for it. Anyways, do
 mail me the code, definitely woudl like to check it out.

Yeah, same happens here - you pay for caller ID or you don't get it on
standard phone lines.  But there have been problems with various modems not
recognizing the caller ID format used here for some reason - I would have
thought it would be fairly standard world-wide, but telcos are notorious for
non-standard stuff :

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

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

2001-08-28 Thread Corey Murtagh

- Original Message -
From: [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 4:31 PM
Subject: RE: [DUG]: Lazarus



 The point was that the code used to show how the highlighting would
display
 in the editor is the same...
 Guess I didn't make myself clear the first time.  They actually use the
 SynEdit control and highlighters inside
 the actual editor.  You missed the point big time.

SynEdit?  You mean the open source component for Delphi that anyone could
take and convert to another language (or pascal implementation, or
whatever)?  That SynEdit?  I don't see how using that infringes anyone's
copyrights, unless of course somone involved with the SynEdit project is
somehow stealing Borland's highlighter code.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.


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

2001-08-28 Thread Corey Murtagh


- Original Message -
From: [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 10:56 AM
Subject: Re: [DUG]: Lazarus



 OK this is getting frustrating now...

 This line here
 The point was that the code used to show how the highlighting would
 display in the editor is the same...

 Go into Delphi (D5 assumed).  Select Tools | Editor Options.  Select the
 color tab.  Look at the code used to illustrate how the highlighting will
 work.  The point is that they couldn't even be bothered writing there own
 snippet of code to illustrate the different highlights that would be
 applied.  Nothing earth shattering...  Same event names as well...
 Similar/same property names.  Does VB have similar/same event and property
 names as Delphi.  I've never used it.

Ok, now I KNOW we're talking about different things.  When you're in a
developers forum and you say 'code', the obvious interpretation is 'source
code'.  They did write their own code, or at least get SynEdit to compile on
their platform, or else there'd be nothing there.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Unique Machine ID....

2001-08-08 Thread Corey Murtagh



The NIC address of the dial-up 
adapter is static... AFAIK it's the same on all computers running, at least, the 
same version of windows. Or it could be just the same thing across all 
computers running any variation of Win32 - I haven't checked them all yet 
G

What you need is a way of 
fingerprinting computers, right? There are a few problems with this... 
specifically that identical computers with fresh installs of the same OS 
(especially if you use ghost to copy an installation) are likely to produce the 
same fingerprint. Unless you can get ID codes from the hardware (processor 
serial, drive serial, etc) then there's not much variation between 
them.

Short of generating (and storing 
somewhere) a code of your own (GUID, etc), I can't see a viable way of doing 
this. Even then there's not a lot stopping me from using a drive 
duplicator to install an exact image of my HD to another machine, including 
whatever you've stored :/

There are usually a few spare bytes 
at the end of the RTC/CMOS memory, if you're game to try using those 
:

--Corey MurtaghThe Electric 
Monk"Quidquid latine dictum sit, altum viditur."


Re: [DUG]: Sets of Strings?

2001-08-01 Thread Corey Murtagh

- Original Message -
From: Ross Levis [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Wednesday, August 01, 2001 11:41 PM
Subject: [DUG]: Sets of Strings?


 A beginners Pascal question here:

 Is there a better way of doing this?
 If (Extension='.wav' or Extension='.mp3' or Extension='.ogg') then ...

 Is there something similar to a Set I can use that would let me write
 something like this?
 If Extension in AudioFiles then ...

 I tried Pos(Extension,AudioFiles)0 but an extension of '.w' would also
 be true.

You can do something like this with a TStringList using the IndexOf method.


 Another question.  Is it quicker to add many items to a TStringList
 unsorted and then Sort it; or set Sorted True  sort each item as it is
 added?  Or is there no difference?

Sorting after you add is MUCH faster, for a couple of reasons.  One is that
when 'Sorted' is true the Add methods of TStringList first check to see if
the string already exists using the Find method, which also returns the
correct position if the string doesn't already exist.  The second is that
when you insert a value near the front of the list it has to move all the
others to make room, which is much slower than using Sort once on the list
once you've added everything to it.

I did a quick speed test on it, adding 1 numeric values (in reverse
order) to sorted and unsorted lists, then sorting the unsorted one.
Results:

Unsorted:
  Add 0.382s
  Sort0.970s
  Total   1.352s

Sorted:
  Total   119.320s

This is a worst-case scenario for the sorted list of course, so I tried it
in ascending order (best case) and got a total time of 2463ms.  Much better,
but still way slower than adding to the unsorted list.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Lan base vs WAN/Web based Databases

2001-07-26 Thread Corey Murtagh

- Original Message -
From: Steve Aish [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Thursday, July 26, 2001 5:51 PM
Subject: [DUG]: Lan base vs WAN/Web based Databases


 I have a customer based in the US who wants a database which to start with
 will be LAN based.  18 months from now he wants to make it a web based app
 so that reps can access it from anywhere in the US.

 Is there any point in designing the LAN based version and then porting it
to
 web based or is it a major shift?

If by 'web based' you mean 'browser based', then it's quite a shift in GUI,
but the database logic should remain basically the same.

As someone else suggested though, why not make it XML (or some other handy
encoding) and sell them a client application too :)

 The reason I ask this is that in order to set up a web based app we need
to
 invest lots of money and upgrade to Delphi 6 Enterprise (I currently use
 Delphi 5 Professional).  This means that the customer will also be
investing
 a lot more money up front in order to make purchasing Enterprise
affordable
 for us and the project worth doing.

Just my NZ$0.02, but if you're going with standard browser stuff then get
hold of a reasonably good CGI component set (we use CGIExpert) and see how
hard you find writing through that.  If you like it, then no reason at all
to upgrade to Enterprise... which either means more profit for you or lower
cost for the customer.

Even if that doesn't pan out, there are still plenty of other options aside
from spending megabucks on Enterprise.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Kylix now Free for Open Source Projects

2001-07-26 Thread Corey Murtagh

- Original Message -
From: Mark Derricutt [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 8:53 AM
Subject: Re: [DUG]: Kylix now Free for Open Source Projects


 Question, if we're writing a *NEW* application with Kylix, does this
 exception kick in, the quoted paragraph was talking about if the modified
 program... which new ones are not

Even more importan question... if Kylix uses any GPLed code, then doesn't
the GPL require it to be open-source too?  Just a thought :

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Timing Resolutions

2001-07-25 Thread Corey Murtagh

- Original Message -
From: Colin Fraser [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Wednesday, July 25, 2001 2:50 PM
Subject: RE: [DUG]: Timing Resolutions


 What are you trying to do??

 Myles.

 Hi Myles,

 The application was for controlling a robotic arm... I believe the
 application used to count pulses (from something) as the arm moved but
this
 was proving unreliable as a pulse or two was getting missed.

Sounds like rotary encoder stuff.  Depending on how high resolution the
encoder is it could produce a huge number of transitions per second.  We had
a problem like this with a machine I helped setup years ago...

 The application would need to time the movement of the arm... I think they
 where also looking at a PLC to do the counting and return the counts to
the
 PC, that was another option.

Depending on how fast the encoder (or whatever it is) sends pulses a PLC may
not be fast enough.  We had to build a step-down device to slow the pulse
rate down before feeding it to a PLC.  If you have access to a reasonably
competent electronics person you might want to talk to them about building a
little device that converts the pulse stream to an 8-bit number of some sort
that you can feed in through a parallel or serial port.  I can give you a
few ideas about how if you want...

Having said that, modern computers are fast enough to handle most stuff of
this nature.  If you can be sure that you can get an input loop/timer to
scan the stream at least twice per transition then you should be able to
read the bit stream... then you just have to decode it :)

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Kylix now Free for Open Source Projects

2001-07-25 Thread Corey Murtagh

- Original Message -
From: Peter Harrison [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Thursday, July 26, 2001 9:37 AM
Subject: [DUG]: Kylix now Free for Open Source Projects


 Hi Guys,  Just saw this today on Slashdot:
snip

 This is almost enough for me to reformat my Windows Machine to Linux :-)

I tried last night, but looks like I'm going to have to run Kylix on another
machine... I'm not giving up my Debian! :

Seriously though, has anyone managed to install it under Debian?  If so then
there's hope for me yet.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Proportional String Lengths?

2001-07-17 Thread Corey Murtagh

From: Ross Levis [EMAIL PROTECTED]
 Here's a Windows dev newbie question.  I'm use to working in DOS with a
 fixed size font.
 I'm using a Listbox to list 2 column's of data.
 {I could use a StringGrid but I don't need all the added functionality 
 it adds an extra 50k to the size of the EXE.  I like to keep things as
 simple as possible.}
 This is done by setting the TabWidth property  separating the 2 fields
 with a tab (^I).  It works well except when the first field exceeds the
 length of the TabWidth, whereby it moves the 2nd field another TabWidth
 to the right.  I would like to truncate the first field before it
 exceeds the tab length, but is there any easy way to calculate the
 physical length of a string of characters?  I'm guessing not, without
 knowing each characters width.

You can get the width of a string by calling the TListBox.Canvas.TextExtent
method, passing it the string you want to test, then trim down the string if
it's too long.  See below for another option though...

 I have a similar problem with a listbox where I want to store a list of
 numbers right-justified.  I tried the Format function to force the Width
 but it only works with a fixed size font.  I've been forced to use the
 'precision' option to add leading zeroes to the numbers which looks
 ugly.  What is the standard way to do this?

If you want anything non-standard, the best way is to draw it yourself.  Set
the TListBox.Style property to lpOnwerDrawFixed and write an event handler
for TListBox.OnDrawItem.  This solves both the right-aligned problem and the
item-too-long problem by letting you draw the items exactly how you want
them to look.

Here's a quick sample.  You'll have to excuse any errors in coding - I'm a
BCB programmer :

procedure TForm1.ListBox1DrawItem(Control: TWinControl;
Index: Integer;Rect: TRect; State: TOwnerDrawState);
var
  txtSize : TSize;
  txt1, txt2 : String;
  Rect1, Rect2 : TRect;
begin

{ add some code here to fill txt1  txt2 with something based on index }

{ now draw it }
  Rect1 := Rect;
  Rect2 := Rect;
  Rect1.Right := Rect1.Left + 50;
  Rect2.Left := Rect1.Right;
  with ListBox1.Canvas do
  begin
Font.Color := clWindowText;
Brush.Color := clWindow;
if odSelected in State then
begin
  Font.Color := clHighlightText;
  Brush.Color := clHighlight;
end;
if (odGrayed in State) or (odDisabled in State) then
  Font.Color := clGrayText;

  { draw first column }
TextRect(Rect1, Rect1.Left + 2, Rect1.Top, txt1)

  { draw second column, right-aligned }
txtSize := TextExtent(txt2);
TextRect(Rect2, Rect2.Left + Rect2.Width - txtSize.cx - 2,
 Rect2.Top + 1, txt2);
  end;
end;


Hopefully (if I translated it right) that will draw your list items in two
columns, with the first one truncated at column 50 (an arbitrary column
width I snatched out of thin air), and the second one right justified.  If
the value for either one is larger than the rect it's drawn in then the
excess will be lost.  Only the specified rect will be drawn.

Play around with it and see what happens.

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.

---
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]: Delphi Kylix compatibility

2001-07-15 Thread Corey Murtagh

Nirav, could you please turn off your receipt notification?  I'm sure you
don't need to know when everyone on the list receives your messages.

-- 
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
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]: Delphi 6 Registration

2001-07-11 Thread Corey Murtagh

From: Mark Derricutt [EMAIL PROTECTED]

 If that would be illegal, how come MS can do it with their activation
 stuff?

Did you follow the last time someone tried to take M$ to court?  They get
away with a lot of stuff because they're just too damn big.

 And what happens if you don't have net access?  (or, email only access).

Then you get bugged a lot I guess :

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur.


---
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]: Copying Files

2001-07-05 Thread Corey Murtagh

Donovan J. Edye wrote:
 
 N,
 
 1. Have a look at rsync http://rsync.samba.org/. It's available for most
 flavours of *nix as well as Windoze
 2. A file that size would also do well from an FTP transfer. You could do
 resumes if the transfer broke etc
 
 Assuming that the boxes are Windoze the last thing I would be looking at
 is an SMB (ie Windoze copy) transfer

Why is that?  I've never had any problem copying 100MB+ files from one Win9x
machine to another.  Over a 10Mbit ethernet (assuming little to no other
traffic) it should only take a little over a minute to transfer a 40MB file.

-- 
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
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]: Copying Files

2001-07-05 Thread Corey Murtagh

Donovan J. Edye wrote:
 
 C,
 
 Yeah. When I read network I was thinking more in terms of a WAN where
 nodes may only be connected by 56K modems. Obviously sitting on a
 10/100mbit network will get the file copied with no problems using SMB.
 Try that between some modems using SMB and you have the start to ending up
 in a mental institution. ;-)

Ah, a fundamental difference in assumptions then :

I wouldn't advise SMB for anything but fast networks - 10Mbit being a
minimum.  For anything else (including 'fast' serial links) just about ANY
other form of transfer, especially one with resume, is preferable.

-- 
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
---
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: Re: [DUG]: Printing

2001-07-03 Thread Corey Murtagh

Sorry about the lack of quoting... stupid email program doesn't handle 
quoting HTML posts (time for a change), but... 

In your example code you create a TImage, but don't give it a size.  
Have you tried copying it to a on-screen canvas to see what it looks 
like?  I suspect that it's got no height or width, so when you copy it 
to the printer canvas there is (understandably) nothing to copy. 

Try:

drawbfr := TBitmap.Create(Application)
drawbfr.PixelFormat := pf1bit;
drawbfr.Height := 1;
drawbfr.Width := 1;

try
  SourceRect := Rect(0, 0, 1, 1)

  drawbfr.Canvas.Rectangle(1, 1, 200, 200);

  Canvas.CopyMode := cmSrcCopy
  Canvas.CopyRect(SourceRect, drawbfr.Canvas, SourceRect);
finally
  drawbfr.Free;
end;

You can assign the bitmap to the TImage if you prefer, or try resizing 
Image.Picture, but it seems to me that TImage has lots of overhead that 
you don't need in this instance.  The worst part about this whole thing 
is that in the example above drawbfr will have a total of 1 
pixels occupying around 1.25MB of memory, and copying the whole thing 
to the printer canvas could cause you some major headaches.  Not to 
mention the fact that many video drivers have issues with huge bitmaps, 
and aren't particularly well known for handling huge CopyRect 
operations smoothly. 

All in all I think though that it's a better idea to draw direct to the 
printer.  Less memory required, you can take advantage of the printer's 
own drawing commands (esp. handy for PostScript printers), and you 
avoid the majority of video-driver related issues. 

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

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

2001-06-26 Thread Corey Murtagh

Robert Martin [EMAIL PROTECTED] wrote on 27/06/2001 13:30:45:

 Hi just a quick question.  I believe that TImage doesnt support Jpeg 
 files, which our users may want to use.  What is the best way of 
 doing a preview of BMPs and Jpegs.  Do we need two components, 1 for
 each image style or is there a component that displays both?

I believe there's a TJPEG component that ships with Delphi.  Have a 
look for jpeg.dcu in your delphi dir - in BCB it's in ...\lib\obj, but 
I can't recall how Delphi lays out the directories.  This module 
implements a TJPEGImage class and registers itself with TPicture (I 
think) to enable it to handle reading  writing JPEG images.  At worst 
you'll have to instatiate a TJPEGImage to load the file, then copy the 
decoded bitmap to somewhere, or paint it directly onto your display 
canvas. 

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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: RE: [DUG]: Zero-footprint database drivers

2001-06-26 Thread Corey Murtagh

Myles Penlington [EMAIL PROTECTED] wrote on 27/06/2001 16:05:59:

What about IB6 - it supports a read-only DB especially for CD-Drives?

Don't know how you go about avoiding installing the drivers. I suppose 
if it is all in the same directory, or the cd has the correct 
directory structure, then it may work without an install. 

You may have to experiment to see if it works as you require.

He's looking for something that compiles into the executable - ie 
nothing to install on the user's system other than the executable 
itself, and it sounds like it's being written to run direct from the CD.
 

That in mind, I wouldn't hesitate to back Edward Aretino's suggestion.  
I've used kbmMemTable for quite a few things, and it works great.  
There are a few gotchas, but they generally only pop up when you do out-
of-the-ordinary stuff. 

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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]: Writing to HKEY_LOCAL_MACHINE by non-administrator

2001-06-26 Thread Corey Murtagh

Alex Kouznetsov [EMAIL PROTECTED] wrote on 27/06/2001 16:29:21:

When Delphi application is ran by non-administrator user on NT/2000 
PC, it cannot write to HKEY_LOCAL_MACHINE registry key.

Are there any tricks to get around this limitation ?

Not as far as I know.  There are a bunch of good reasons that it's 
protected.  If you absolutely must change something in there then 
you'll need to get someone to log in as admin and do it for you. 

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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: RE: [DUG]: Delphi Graduate Programmer Job Offer

2001-06-25 Thread Corey Murtagh

[EMAIL PROTECTED] wrote on 26/06/2001 15:43:52:

Maybe they have to have a degree?

 Sorry don't mean to be facetious but. surely if the person had 
 two 
years experience they wouldn't be graduates.

Guess I'm screwed then... been programming for lots of years, but I 
never got a piece of paper that said I knew how.  And considering some 
of the programmers I've met with CS degrees... 

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!

---
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 Corey Murtagh

The important part of this thread though is that you should be careful 
how you test the return from message dialogs.  The rule of thumb that 
we use is if you're going to do something with one of the possible 
responses then that is the one you should test.  So if you're asking 
the user if they really want to delete something then you abort on 
anything other than 'Yes'.  If on the other hand you ask them if they 
want to keep the record, then you abort on anything other than 'No'. 

Robert Martin [EMAIL PROTECTED] wrote on 21/06/2001 10:20:19:

I tend to agree with Rohit from a usability stand point.  we often use 
OK and Cancel instead of yes/ no.
snip
- Original Message -
From: Rohit Gupta [EMAIL PROTECTED]
snip
 Steve,

 I think all those boxes should have yes/no/cancel buttons even if
 cancel does the same as no.  :-)

I've always thought that this is only useful if all the buttons do 
different things.  Like a save query that pops up when you close a file 
- yes to save, no to discard changes, and cancel to keep the file open. 
 Redundant GUI elements just aren't sexy : 

PS: Sorry Rob, my email client went nuts and sent this to you (possibly 
twice) instead of the list.  Oops. 

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!


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



  1   2   >