General issues with Borland Delphi

borland delphi, delphi component, tutorial delphi

Re: Kylix + Libc functions

Hallo,

 > I would recommend looking at Kylix/Delphi ways of sorting rather
 > than writing C in Pascal by using Libc unless there is no equivalent
 > Pascal function.

Thank you for help and idea, I will try it asap.

I was looking for sorting in Delph help, but I am afraid,
there is nothing for me. But, may be, I am wrong :-)

Probably, the best will be to explain what I do:
I have tried to write simple and multiplatform filemanager,
something as WindowsCommander (or Total Commander now :-) )
= written in Delphi and Kylix.
I know, in Linux are a lot of good fm but I like the specifics
of WC. And – programming is one of my "hobby" then I can do
it by my self :-)

The actual problem is sorting of listed files.
Before I have tried to sort through TStringList with string items
(the field to sort) and with pointer to file structure as TObject.
But I don’t like this solution and I am looking for the sorting
algorithm.
I know that in Kylix I can use Libc functions and I know that there
are some sorting functions. In Delphi I didn’t find something
similar, but this is one of first experiments and in future
I will probably use better sorting…

Simply – now I need to sort a field of structures with sorted item
and index of item in unsorted list, e.g. for file names

RItem = record
      Name    : String;
      Number  : Integer;
end;

Then, this evening I will try your corrected version.

 > The server url is:- forums.inprise.com

Thank you, I will try it – I was looking for Kylix
conference before but I have found only Delphi.

Regards

Peter

Comments (3)

Two Delphi7 questions

1. How can I train Delphi7 to start with the project loaded that I was
working on at shutdown?

2. How can I train Delphi7 to load ALL the files in the project? (At least
the ones one might normally load into the IDE)

any enlightenment will be appreciated.

TIA

Vic


________________________________________________________

Victor Fraenckel – The Windman                 vfrae…@nycap.rr.com
KC2GUI                                                      www.windsway.com

      Home of the WindReader Electronic Theodolite
                               Read the WIND

"Victory at all costs, victory in spite of all terror, victory however long
and hard the road may be; for without victory there is no survival."
– Winston [Leonard Spencer] Churchill (1874 – 1965)

Dost thou not know, my son, with how little wisdom the world is governed?
-Count Oxenstierna (ca 1620)

Comments (2)

Delphi Calculator Help

Hi,
I am a trying to create a simple calcuator in Borland Delphi 6. My
code at the moment is as follows;

var
  Form1: TForm1;
  Runintot: Integer;
  Operator:Char ;

implementation

{$R *.dfm}

procedure TForm1.PlusButtonClick(Sender: TObject);
begin
runintot:=runintot + strtoint (edit1.text);
edit1.text :=”;
Operator := ‘+’;
end;

procedure TForm1.SubtractButtonClick(Sender: TObject);
begin
runintot:= runintot – strtoint (edit1.text);
edit1.text :=”;
Operator := ‘-’;
end;

procedure TForm1.No1Click(Sender: TObject);
begin
edit1.text:=edit1.text+’1′;
end;

procedure TForm1.No2Click(Sender: TObject);
begin
edit1.text:=edit1.text+’2′;
end;

procedure TForm1.No3Click(Sender: TObject);
begin
edit1.text:=edit1.text+’3′;
end;

procedure TForm1.No4Click(Sender: TObject);
begin
edit1.text:=edit1.text+’4′;
end;

procedure TForm1.No5Click(Sender: TObject);
begin
edit1.text:=edit1.text+’5′;
end;

procedure TForm1.No6Click(Sender: TObject);
begin
edit1.text:=edit1.text+’6′;
end;

procedure TForm1.No7Click(Sender: TObject);
begin
edit1.text:=edit1.text+’7′;
end;

procedure TForm1.No8Click(Sender: TObject);
begin
edit1.text:=edit1.text+’8′;
end;

procedure TForm1.No9Click(Sender: TObject);
begin
edit1.text:=edit1.text+’9′;
end;

procedure TForm1.No0Click(Sender: TObject);
begin
edit1.text:=edit1.text+’0′;
end;

procedure TForm1.ClearClick(Sender: TObject);
begin
edit1.text:=”;
end;

procedure TForm1.ClearEClick(Sender: TObject);
begin
runintot:=0
end;

procedure TForm1.EqualsClick(Sender: TObject);
begin
If Operator = ‘+’ Then
        begin
        runintot:= (runintot) + strtoint (edit1.text);
        edit1.text:= inttostr (runintot)
        end;
If Operator = ‘-’ Then
runintot:= (runintot) – strtoint (edit1.text);
edit1.text:= inttostr (runintot);
end;

end.

My equals button is where the problem lies i think. I have tried a If
Then Else loop but the subtract button still doesnt work properly. Any
help would be very much appreciated via email if possible.

Thanks

Simon

Comments (2)

Using fewer colors ?

We have a problem.
Our application uses too many resources when running 24 bit true colors.

Using only 16 bit frees about 40% CPU time for other things.

The main problem is, however, that we need to be able to pick up the
color under the cursor and get excactly the same value out, that the
application put into that pixel.
Currently our application uses 24 bit internally, but …

Is 16 bit color mode using a palette, just like 256 colors does ?
Or in case a palette is not in use, what then ?

Is the palette available from somewhere, so we kan do the conversion
ourselves ?
Or will the display driver do the job for us ?
Can we put in our own palette ?

The application in question does not run alone on the PC, but it is the
only one that
needs to be visible. It uses the entire 1600×1200 display area anyway.
About 95% of the screen is used for showing graphics representations of
data from a recording system.

Comments (7)

ANN: Catch every exception showing Unit, Class, Method & Line #.

Is available the new EurekaLog 4.0.4 (www.eurekalog.com).

EurekaLog is an add-in tool for giving your application (GUI, Console,
Web, …) the ability to catch every exception, generating a detailed
log of call stack (with unit, class, method and line # – like this
example), showing it and sending back to you via email.

It’s easy to use because it’s full integrated into Delphi’s IDE (so
you need only a single rebuild to add the new ability to your
applications), it doesn’t decrease application performances (because
it works only when exceptions raise) and it increases the compiled
file size just by 0.5% – 4% about (it uses this space to store some
additional, compressed and encoded debugging information).

EurekaLog is compatible with Delphi 3, 4, 5, 6, 7 and is works on all
Windows platforms, from Win 95 to Win XP.

With full source (only Enterprise version), full money back guarantee,
royalties free, freely upgradable!

Don’t lose anymore time and money debugging your applications, now
EurekaLog debug its for you.


Best regards…

Fabio Dell’Aria.

No Comments

messenger service

does some one now can i use messenger service from within delphi to
send messages to an IP address! URGENT!!!

Comments (5)

Form To Always Maintain Focus

I have a Delphi form – set to fsStayOnTop – and indeed it does stay on
top of everything else – always, but it doesn’t prevent it from losing
focus. I’ve tried putting code into a proc’ to setfocus to it again,
on AppDeActive, but it doesn’t appear to actually make any difference
– although the procedure does get executed (I have code in the
procedure to change the form caption). Is their some other method of
achieving what I want? I don’t really want to be messing around with
timers etc, etc and constantly checking – I’m convinced that there
must be a way of keeping it on top, and always having focus – but I
just don’t know what it is.

Many thanks.

No Comments

shellexecute or executefile?

Hiya

Can anyone explain the difference in shellExecute and executeFile? What
other options are there to SW_SHOWNORMAL?

Thanks for any help
Pete

Comment (1)

Enhanced exception handler – I am very stupid.

I’ve just spent the last 2 days trying to get write some kind of
exception handler that will give me a stack trace on my clients
machines. I’ve been searching the www, news etc and loads of people
have been asking the same question. I’ve even tried the usual suspects
(exceptional magic etc.) but could not get them to work.

I use D7 pro. On the bonus disk is the JEDI distribution. It has an
enhanced exception dialog as part of the distro, though I only found
it by luck!

If you have JEDI, just add the unit

<installdir>\JEDI\JCL\examples\debugextension\dialog\ExceptDialg.pas

into you project. When you re-build you will have a new exception
handler that gives a full stack trace (as well as loaded modules &
vcl’s active).

If you dont have JEDI, get it ( www.jedi.org ) …

Just thought I would share this in the hope that in the future someone
is looking for the same as me and finds this message and it helps!

Right. I need a beer :-)

Tim.

Comment (1)

re-arranging Items in a treeview

What is the easiest/cleanest way to re-arrange items in a treeview (not
sort)?

all nodes are top level (no children, no parent)

TTreeNode.MoveTo wants a parent or child node to move the selection to and
the new relationship that will be made…

thanks,

Patrick

Comments (2)