Pascal Newsletter #38 - 31-JUL-2002
INDEX
1. A FEW WORDS FROM THE EDITOR
2. DELPHI 3,4,5 TCOLLECTION PERFORMANCE ISSUES AND SOLUTIONS
3. UNDO REDO USING COMMANDS
4. GETTING THE NAME OF THE HOST GIVEN ITS IP ADDRESS
5. FORUMS
6. DELPHI ON THE NET
- Components, Libraries and Utilities
. Shareware/Commercial
. Freeware
- Articles, Tips and Tricks
- Tutorials
________________________________________________________________________
1. A FEW WORDS FROM THE EDITOR
I'd like to express my gratitude to William Egge for contributing his
article "Undo Redo Using Commands" for this newsletter, and I'm please
to award him a Delphi Information Library CD (DIL CD), a great
information resource with articles, tips, tricks, components,
javascripts, images, update packs, and much more, provided by the UK
Borland User Group: http://www.richplum.co.uk/dil/index.asp
I'd also like to thank Clever Components Support Team for contributing
the article "Delphi 3,4,5 TCollection Performance Issues and Solutions",
and I'm pleased to award them the license of AnyShape Transpack v2.0,
the component to ease the creation of transparent, weirdly shaped
windows with WYSIWYG editing, design-time preview, automatic dragging,
and REAL stay-on-top forms, among other features, provided by MindBlast
Software: http://www.mindblastsoftware.com/?page=transpack&ref=PascalNL
I've been sick recently, so please excuse me for not writing another
part of Inline Assembler in Delphi. By the way, in the last issue, EAX
was erroneously mentioned instead of ECX in the comments for the code
snippet where we checked whether the string length was zero. The
comments should read as follows:
test ecx, ecx // And ECX with ECX to set flags (ECX unchanged)
jz @@end // Go to @@end if the zero flag is set (ECX=0)
As many of you probably know, Borland released Kylix 3 last week, adding
C++ support. At this pace, in 18 months the Kylix version number will be
greater than Delphi! :-) Do you think Borland is doing right, or that
they are releasing Kylix versions too often? We'd like to hear your
comments and opinions about that.
Ernesto De Spirito
eds2008 @ latiumsoftware.com
________________________________________________________________________
JfControls Library. Multi-language. Multi-appearance. Skins. Privileges.
More than 40 integrated and customizable components. Impressive GUI.
Centralized resources administration. Multiple programming problems
solved. For Delphi 3-2006 & C++ Builder 3-6. http://www.jfactivesoft.com
________________________________________________________________________
2. DELPHI 3,4,5 TCOLLECTION PERFORMANCE ISSUES AND SOLUTIONS
By Clever Components Support Team <info@CleverComponents.com>
Please see original article for more at Clever Components's web site:
http://www.clevercomponents.com/articles/article008/collectionperf.asp
If you are using TCollection classes in your Delphi 3, 4 or 5
applications then you will find this article quite interesting.
Firstly let us try fairly simple code:
procedure TForm1.Button1Click(Sender: TObject);
var
old: TCollection;
i: integer;
begin
old := TCollection.Create(TCollectionItem);
for i := 0 to 100000 do
begin
old.Add;
end;
Windows.beep(900, 1000); // hi-freq beep after we done with adding
// empty items
old.Free;
Windows.beep(100, 1000); // low-freq beep after we done with
// destroying empty items
end;
You might think that low-freq beep will follow right after hi-freq beep
(well what can be faster that just simply destroy all collection items)
- but IT IS not!
In fact it takes 10-20 seconds to destroy collection which hold several
thousand items - and worse of all your CPU will be 100% busy. We bumped
into this problem when a client complained that an application would
"freeze the PC for a few minutes".
To understand why it is happening you need to take a closer look at
TCollectionItem.Destroy, TCollectionItem.SetCollection and
TCollection.RemoveItem functions which are located in classes.pas - the
last one is the key to understanding this problem.
You also might want to compare your TCollection.RemoveItem version to
Delphi 6 TCollection.RemoveItem code:
{ classes.pas from Delphi 6 }
procedure TCollection.RemoveItem(Item: TCollectionItem);
begin
Notify(Item, cnExtracting);
if Item = FItems.Last then
FItems.Delete(FItems.Count-1) // that will fix original problem
else
FItems.Remove(Item);
Item.FCollection := nil;
NotifyDesigner(Self, Item, opRemove);
Changed;
end;
Now you probably will want to fix it. But seems it is not so easy
because TCollection.RemoveItem is not a virtual or dynamic function.
Here are two solutions:
You will need to alter classes.pas - put that TCollection.RemoveItem
code from Delphi 6 into your version of classes.pas.
Copy new (fixed) classes.pas into your project directory and put it at
the first position in your .dpr uses section like this:
program Project1;
uses
classes in 'classes.pas' // new classes.pas with fixed
// TCollection.RemoveItem
Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
Now your project will be compiled with the new version of TCollection.
In some situations it is not so convenient or even not possible to use
an altered classes.pas and in this case we have another trick for you.
type
{ TFixCollection - fix TCollection.RemoveItem issue in Delphi 3,4,5 }
TFixCollection = class(TCollection)
public
{ Unfortunately Clear is not a virtual or dynamic procedure so
we will have to reintroduce it }
procedure Clear;
destructor Destroy; override;
end;
procedure TFixCollection.Clear;
var
i: integer;
AList, OrgList: TList;
begin
AList := TList.Create;
try
OrgList := TList(PDWORD(DWORD(Self) + $4 +
SizeOf(TPersistent))^);
{ Save original pointers to collection items }
for i := 0 to OrgList.Count-1 do
AList.Add(OrgList[i]);
OrgList.Clear;
{ Destroy collection items }
for i := 0 to AList.Count-1 do
TCollectionItem(AList[i]).Free;
finally
AList.Free;
end;
inherited;
end;
destructor TFixCollection.Destroy;
begin
Clear;
inherited;
end;
{ Let's try again ! }
procedure TForm1.Button2Click(Sender: TObject);
var
old: TFixCollection;
i: integer;
begin
old := TFixCollection.Create(TCollectionItem);
for i := 0 to 100000 do
old.Add;
Windows.beep(900, 1000); // hi-freq beep after we done with adding
// empty items
old.Free;
Windows.beep(100, 1000); // low-freq beep after we done with
// destroying empty items
end;
As you can see it now works just fine. We used a trick which gives us
access to the protected section of TCollection. You can use both
techniques in your applications written on Delphi versions 3,4,5.
For your convenience, Delphi 3,4,5 TCollection performance issue demo is
attached.
Clever Components Support Team
http://www.CleverComponents.com
info@clevercomponents.com
________________________________________________________________________
3. UNDO REDO USING COMMANDS
By William Egge egge@eggcentric.com
Visit Eggcentric at http://www.eggcentric.com
There are 2 ways to do undo - redo, one is with state, the other is
using commands. This article explains using commands and provides full
source code implementation of a TUndoRedoManager
This article will cover
1. Command
2. Requirements of a command
3. Command Stack
4. Undo redo manager
5. Command grouping
6. Full source code implementation
A command is simply an object that implements an action in the system,
for example in a paint program a command may be a line command, or a
circle command, or a rectangle command, and so on. In order to implement
command based undo - redo you must design your editing to use command
objects.
Because we want to undo and redo the effects of commands, the commands
themselves must be able to undo and redo their own action as well as
execute the initial action.
The primary methods of a command are
- Execute
- Undo
- Redo
You may wonder why there is a separate Redo instead of simply reusing
the Execute method. This is because the redo implementation may be
different than the Execute. For example, if this were a paint command.
The Execute may choose the brush and follow some algorithm to draw some
sort of gradual transparent circle. The redo could simply copy a image
of the results of the paint rather than painting again. In any case, if
this functionality is not needed then simply call the Execute method
from within your Redo method.
OK, so now we have one command. We need to remember the sequence of
commands so we can have multilevel undo and redo. This is the command
stack.
When you undo, you take the last command and call its undo method. The
next time you undo, you call the undo method of the 2nd command from the
top and so on. When you redo, you call the redo method of the last
command that you called undo on. To simplify this we create 2 lists, an
undo list and a redo list and encapsulate these with an undo manager.
For the UndoRedoManager, we give it 3 methods:
ExecuteCommand(Command)
Undo
Redo
Internally the UndoRedoManager will maintain 2 lists of commands, Undo
and Redo.
Here is the full sequence:
1. Execute a command by passing it to the ExecuteCommand method,
internally the UndoRedoManager will call the Execute method of the
command and then add the command to the top of the Undo list.
2. Calling undo, the manager will take the last command in the undo
list, call its undo method and then remove the command from the undo
list and add it to the redo list.
3. Calling redo will do the reverse of undo, it will take the last
command from the redo list, call its redo method, then remove it from
the redo list and add it to the top of the undo list
4. Now, the next time ExecuteCommand is called, we must prune the redo
list... delete all commands in it.
Sometimes, or most of the time, you will execute a bunch of commands as
a single group. Calling undo and redo should undo and redo this entire
group and not the individual commands within it one at a time. An
example might be some wizard that did a lot of things, you would want to
undo and redo this as one group.
I'll add 2 methods to the UndoRedoManager:
BeginTransaction
EndTransaction
All commands executed between calls to BeginTransaction and
EndTransaction will be stored as one group. You should be allowed to
make nested calls to BeginTransaction and EndTransaction.
Using inheritance, this can be easy to implement. We make a command
group class that inherits from the Command, that way the manager acts as
if it is working with single commands.
Attached is the full source code of a working UndoRedoManager along with
interfaces for IUndoRedoCommand and IUndoRedoCommandGroup.
Note: I think a lot of people associate Delphi interfaces with ActiveX
or COM and then think that interfaces ARE ActiveX or COM. This is not
true, you can create classes that implement interfaces and those classes
do not have any implementation of ActiveX or COM. They do not require
registering and all the things that go with COM or ActiveX. You should
keep in mind that interfaces are reference counted, they are freed when
there are no more references.
Source code is attached in the zip file.
________________________________________________________________________
4. GETTING THE NAME OF THE HOST GIVEN ITS IP ADDRESS
By Ernesto De Spirito <eds2008 @ latiumsoftware.com>
If we have an IP address in a string (like '207.105.75.31'), and we want
to know the name of host it corresponds to, we can use the GetHostByAddr
API that comes with Windows Sockets ("Winsocks") 1.1 or later. The
following function encapsulates the API call.
uses WinSock;
function GetHostByAddr(IP: string): string;
var
WSData: TWSAData;
SockAddrIn: TSockAddrIn;
HostEnt: PHostEnt;
begin
Result := '';
// Try to start a winsocks session
if WSAStartup($101, WSData) = 0 then begin
// Convert the IP string into bytes in network byte order
SockAddrIn.sin_addr.S_addr := inet_addr(PChar(IP));
// Call GetHostByAddr
HostEnt := WinSock.GetHostByAddr(@SockAddrIn.sin_addr.S_addr,
SizeOf(SockAddrIn.sin_addr.S_addr), AF_INET);
// If successful...
if HostEnt <> nil then
// ...get the host name (return value)
Result := StrPas(Hostent^.h_name);
// Close the winsocks session
WSACleanup;
end;
end;
Example call:
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(GetHostByAddr('207.105.75.31'));
end;
________________________________________________________________________
5. FORUMS
To join any of our forums, the best way is to subscribe from the web,
since that way you'll be able to access the features available at the
web site (like changing your subscription options, viewing the past
messages, accessing the files section, etc.). A Yahoo! ID is required
for that, and you can get yours free by registering as a Yahoo! user,
but if you don't want to register or if you don't have full Internet
access, you can also subscribe by email (you'll only have email access).
* Delphi: If you know a lot about Delphi but you are still far from
being a guru this forum is for you. This is the only forum for
intermediate-level Delphi programmers on the Web (Delphi experts are
also welcome :-)
http://groups.yahoo.com/group/delphi-en/
Subscription:
http://groups.yahoo.com/group/delphi-en/join
delphi-en-subscribe@yahoogroups.com
* Kylix: Kylix programming.
http://groups.yahoo.com/group/KylixGroup/
Subscription:
http://groups.yahoo.com/group/KylixGroup/join
KylixGroup-subscribe@yahoogroups.com
* Components: This is a forum for searching/recommending software
components (VCL and CLX components, ActiveX objects, DLL libraries,
shared objects, etc.), as well as utilities, tutorials, information,
etc.
http://tech.groups.yahoo.com/group/components/
Subscription:
http://tech.groups.yahoo.com/group/components/join
components-subscribe@yahoogroups.com
* Software Developers: This is a forum for discussions about software
development and to share experience in the work, professional or
commercial environments. It is not a programming forum, matters
treated here are supposed to be more general or language independent.
http://tech.groups.yahoo.com/group/software-developers/
Subscription:
http://tech.groups.yahoo.com/group/software-developers/join
software-developers-subscribe@yahoogroups.com
________________________________________________________________________
6. DELPHI ON THE NET
By Dave Murray <irongut @ vodafone.net>
Components, Libraries and Utilities
===================================
Shareware/Commercial
--------------------
* SMImport v1.60 - by Scalabium Software
Native VCL suite for importing data into a dataset without external
libraries. Supports import from: MS Excel (without OLE/DDE), delimited
or fixed width text file, HTML, XML (without DOM), MS Access (using
DAO/MS Jet), Lotus 123, QuattroPro, Paradox, DBase and any TDataSet
descendant. Changes in v1.60: new fast spreadsheet engine, extended
date/time parsing, modified wizard, additional settings for support of
custom data formats (eg. currency string).
http://www.scalabium.com/
* The eBook & Box Cover Creator - By Laughingbird Software
Do-it-yourself eCover creation software. Create covers modifying
premade product boxes or ebooks (25 professionally designed covers to
choose from!), 3D product boxes, eBook covers, CD and Magazine covers!
For Macintosh and Windows.
http://www.thelogocreator.com/
Freeware
--------
* Indy 9 - by The Indy Pit Crew, FREEWARE with source
The long awaited Indy 9 has been released. Indy 9 now has 115
components (up from 69 in Indy 8) and many other improvements.
http://www.indyproject.org
* JVCL 1.32 for Delphi 5/6 - by Project JEDI, FREEWARE with source
The JEDI-VCL (JVCL) library is built from code donated by the JEDI
community. It consists of 300+ VCL components that can be instantly
reused in your Delphi (and potentially Kylix) projects.
http://jvcl.sourceforge.net/
* Direct SQL Components - by N Shanny + C Nicola, FREEWARE with source
Cross-platform (Windows+Linux) delphi native components for directly
accesing SQL servers without using any externall dll's. The first
release is for My-SQL but there are plans to extend it.
http://sourceforge.net/projects/directsql/
* SourceForge Setup 1.3 - by Delprhree, FREEWARE with source
Written in Delphi it can install SSH, completely set it up, and also
configure WinCVS for a given project. Designed to make SourceForge
easy to set up, it is split into stages which can be executed
independently. You can unpack SSH, set up SSH and set up WinCVS
individually or all together, depending on your needs.
http://sourceforge.net/projects/sfsetup/
* DelphiWebScript - by Matthias Ackermann + Hannes Hernler, OPEN SOURCE
Powerful script engine for your application or server side scripting.
The script language is a subset of Delphi pascal. Create user defined
functions, add function libraries or processes scripts embedded in
HTML pages. Create a DWS ISAPI, NSAPI or CGI module in 5 minutes!
http://sourceforge.net/projects/dws/
* ActiveX Scripting Components v1.07 - by A Wingrove, FREEWARE w. source
Collection of native VCL components designed to make adding scripting
in your programs easy. Requires Microsoft ActiveX Scripting Control.
http://www.torry.net/authorsmore.php?id=2027
* FreeReport PDF Export Filter v1.0 - by R C Ramirez, FREEWARE w. source
Export reports to PDF from FreeReport/FastReport. Features: identical
copies of your reports with no extra code, frames, Pictures, Lines,
Memo, Bar Code, compression (use Zlib units) and more.
http://www.torry.net/vcl/reports/reportdesigners/frexppdf.zip
* MD5 - by Dimka Maslov, FREEWARE with source
A translation of the RSA MD5 Message-Digest Algorithm described in RFC
1321. It contains functions to evaluate MD5 hashsum of a string, a
file, a stream or any memory buffer, to convert a hashsum evaluation
function result into a string of hexadecimal digits and to compare the
results of two evaluations. No other files or libraries are required.
http://endimus.com
* XPControls v2.10 - by Michael Frank, FREEWARE with source
WinXP Visual Styles supporting components: TXPAnimate, TXPCheckBox,
TXPCheckListBox, TXPGroupBox, TXPListView, TXPRadioButton,
TXPPageControl, TXPThemeAPI, TXPTrackBar.
http://www.torry.net/vcl/packs/interfacelite/xpcontrols.zip
* TAnalogGauge v1 - by Vyacheslav Shteg, FREEWARE with source
Simple meter / gauge component for float values, eg. voltmeter.
http://www.delphipages.com/uploads/Miscellaneous/AnalogGauge.zip
* Gradbar - by Stefan Badenhorst, FREEWARE with source
Derived from a TGraphic, it draws a gradient progress bar with a
default caption of the position. The scaling of the gradient colour
values and the caption can be changed.
http://www.delphipages.com/uploads/Gauges_Meters/gradbar.zip
* TMxOutLookBar v1.51 - by Lajos Farkas, FREEWARE with source
Supports: Office 97, Windows2000 and Windows XP styles; scrolling
headers; gradient, normal and tiled bitmap backgrounds, new bevels
introduced in Delphi 6; 100% native VCL code.
http://www.geocities.com/maxcomponents/
* TMSNPopUp v4.3 - by JWB Software, FREEWARE with source
Allows you to use popup windows like MSN Messenger, offers different
text styles, icon, text, title, customizable gradients, scrolling etc.
http://people.zeelandnet.nl/famboek/
* TXMLSerializer v1.0 - by JWB Software, FREEWARE with source (DELPHI6)
Pass an object as a parameter to the TXMLSerializer component to save
it to disk as XML; works with any object derived from TPersistent.
http://people.zeelandnet.nl/famboek/
Articles, tips and tricks
=========================
* About XML and Delphi - by Zarko Gajic
Everything you need to know about Delphi and the Extensible Markup
Language. Find out about creating and parsing XML documents, look for
parser components and more.
http://delphi.about.com/library/weekly/aa072500a.htm
* TOP 10 Delphi - by Zarko Gajic
Most popular Delphi Programming articles on Delphi About, July 2002.
http://delphi.about.com/library/weekly/bltop10.htm
* How to move the cursor to the currently focused control?
http://www.swissdelphicenter.ch/en/showcode.php?id=1300
* How to access protected properties?
http://www.swissdelphicenter.ch/en/showcode.php?id=1307
* How to extract the audio stream from an AVI file?
http://www.swissdelphicenter.ch/en/showcode.php?id=1309
* How to calculate a simple checksum?
http://www.swissdelphicenter.ch/en/showcode.php?id=1311
* How to get names of installed Mail-Clients?
http://www.swissdelphicenter.ch/en/showcode.php?id=1319
* How to obtain the path to your program at runtime?
http://www.swissdelphicenter.ch/en/showcode.php?id=1321
* How to manage, control NT-Services?
http://www.swissdelphicenter.ch/en/showcode.php?id=1322
* How to play sound through a sound card?
http://www.swissdelphicenter.ch/en/showcode.php?id=1324
* How to play a wave file backwards?
http://www.swissdelphicenter.ch/en/showcode.php?id=1325
* How to obtain DLL-specific version information?
http://www.swissdelphicenter.ch/en/showcode.php?id=1327
* How to print an Excel file?
http://www.swissdelphicenter.ch/en/showcode.php?id=1328
* How to backup a branch of the registry?
http://www.swissdelphicenter.ch/en/showcode.php?id=1330
* How to use Subscript or Superscript in a TRichEdit?
http://www.swissdelphicenter.ch/en/showcode.php?id=1331
* How to insert a image into a TRxRichEdit?
http://www.swissdelphicenter.ch/en/showcode.php?id=1332
* How to bring up a printer's properties dialog?
http://www.swissdelphicenter.ch/en/showcode.php?id=1334
* How to access Listbox items with API?
http://www.swissdelphicenter.ch/en/showcode.php?id=1335
* How to scroll a Treeview when Drag/Drop?
http://www.swissdelphicenter.ch/en/showcode.php?id=1347
* How to use a Webbrowser's OnDocumentComplete with frames?
http://www.swissdelphicenter.ch/en/showcode.php?id=1355
* How to change the TDBNavigator images?
http://www.swissdelphicenter.ch/en/showcode.php?id=1358
* How to validate credit cards?
http://www.swissdelphicenter.ch/en/showcode.php?id=1365
* How to change size of the Windows Start Button?
http://www.swissdelphicenter.ch/en/showcode.php?id=1369
* Something missing about packages - by Pablo Reyes
Packages are a great feature of Delphi, you can put not only
components into packages but also anything you want. This way you can
build modular, customizable applications.
http://www.delphi3000.com/articles/article_3328.asp
* Debugging Shell Extensions using Delphi - by Alex Tischenko
Details of Shell extensions debugging under Windows 9x/W2K/XP.
http://www.delphi3000.com/articles/article_3331.asp
* Quickly Convert JPEG 2 Bitmap - by Howard Barlow
http://www.delphi3000.com/articles/article_3334.asp
* Delphi Add-On : What's New and Hot in Delphi - by Zarko Gajic
Developing a simple Open Tools API menu expert with Delphi. With this
add-on you can get Delphi About's new and hot listing without even
leaving the Delphi IDE!
http://delphi.about.com/library/weekly/aa070902a.htm
* How to fix "dsgnintf.pas not found" - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=8&categories=General
* How to create a hint window with a thin black border - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=8&categories=General
* How to add autocomplete to a TComboBox - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=8&categories=General
* How to refresh file icons - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=15&categories=Graphics
* How to empty a TImage - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=15&categories=Graphics
* How to read progress with TWebBrowser - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=12&categories=Internet/LAN
* Determining Kylix (Linux) Application & Library dependancies - m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=16&categories=Kylix
* How to read file version information - by Mike Pijl
This function returns the full file version structure.
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=9&categories=System
* About Calling conventions
http://www.swissdelphicenter.ch/en/showcode.php?id=1233
* How to determine the version of Internet Explorer?
http://www.swissdelphicenter.ch/en/showcode.php?id=1252
* How to trap own hotkeys in my application?
http://www.swissdelphicenter.ch/en/showcode.php?id=1261
* How to get the primary domain controller (PDC)?
http://www.swissdelphicenter.ch/en/showcode.php?id=1272
* How to change the value of Constants?
http://www.swissdelphicenter.ch/en/showcode.php?id=1284
* How to quickly create a Paradox table using SQL?
http://www.swissdelphicenter.ch/en/showcode.php?id=1286
* How to enable the drop shadow effect on a window (XP)?
http://www.swissdelphicenter.ch/en/showcode.php?id=1296
* How to access the controls of a TRadioGroup?
http://www.swissdelphicenter.ch/en/showcode.php?id=1297
* How to create transparent menus (2000/XP)?
http://www.swissdelphicenter.ch/en/showcode.php?id=1298
* How to prevent a control from Redrawing (Refreshing)?
http://www.swissdelphicenter.ch/en/showcode.php?id=1301
* How to analyze PE file headers?
http://www.swissdelphicenter.ch/en/showcode.php?id=1302
* How to create a icon in the system tray?
http://www.swissdelphicenter.ch/en/showcode.php?id=1303
* How to replace text in a word document?
http://www.swissdelphicenter.ch/en/showcode.php?id=1304
* Using XML in Delphi applications: Part I - by Sergey Kucherov
Understanding XML, developing your own XML Object Model, writing your
own XML parser, using XML in Delphi applications and using XML as a
local database.
http://www.delphi3000.com/articles/article_3314.asp
* Dataset Row Checksum - by Andreas Schmidt
http://www.delphi3000.com/articles/article_3315.asp
* Using MDI while TMDIForm is not your mainform - Uros Gaber
You want to use TMDIForm that you open/create somewhere during runtime
and is not the mainform of your application but Delphi doesn't allow
you to create a TMDIChild if the TMDIForm is not your mainform.
http://www.delphi3000.com/articles/article_3317.asp
* Variable number of arguments - by Sigurdur Hannesson
How to create functions that can accept n number of arguements.
http://www.delphi3000.com/articles/article_3318.asp
* Rudimentary Menu Plug In Mechanism - by Alex Wijoyo
How to define menu plugins using a text file & create them at runtime.
http://www.delphi3000.com/articles/article_3319.asp
* Using IStrings and TStringsAdapter - Siva Rama Sundar Devasubramaniam
A Simple, Straight forward way of using 'IStrings' interface to pass
Multiple Strings from a COM Object.
http://www.delphi3000.com/articles/article_3320.asp
* Precise timer thread using messages - by Brian Pedersen
When programming realtime interfaces and computergames, you need a
precise timing signal. The engine must run at the same rate no matter
what your framerate is. This example shows a game timer implementation
using a thread and messaging.
http://www.delphi3000.com/articles/article_3321.asp
* Changing Interbase Error Messages in runtime - by Ernesto Cullen
Shows a technique used to tackle Interbase errors on the client side,
using IBX. Using this technique, you can turn ugly error messages into
more user friendly ones, or translate them into your own language.
http://www.delphi3000.com/articles/article_3322.asp
* How to get an Unique Identifier for a File or Folder - Gerald Koeder
Everyone who creates a File/folder copy or move-function must check if
a sourcefile/folder exists at the destination. But how can we prove
that two files don't point to the same physical place? Win2k and XP
allow you to mount any volume under a folder and so it's possible that
the files at 'c:\data\*.*' are the same as under 'd:\*.*' for example.
http://www.delphi3000.com/articles/article_3323.asp
* How to create a Combobox in a Stringgrid - by Boris B. Wittfoth
How to dynamically create a Combobox within a Cell of a StringGrid.
http://www.delphi3000.com/articles/article_3324.asp
* Sending data from database by portions - by Vladimir Orlenko
Some times we need send a huge quantity of data from a MiddleWare
Server to a client application. If we do it in one portion then the
user must wait a long time, but we can send this data in portions,
when the user needs it.
http://www.delphi3000.com/articles/article_3325.asp
* How to get the BDE DLL path - by Mike Pijl
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=13&categories=Databases
* How to get a list of open files in the IDE - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=14&categories=Delphi/Kylix+ID
* Access TListbox, TCombobox, TRadioGroup using types - by Mike Pijl
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=8&categories=General
* How to center controls at runtime by code - by Mike Pijl
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=8&categories=General
* How to read image pixels fast - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=15&categories=Graphics
* How to invert a bitmap - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=15&categories=Graphics
* How to get a file's date and time - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=9&categories=System
* How to create a temporary filename - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=9&categories=System
* How to launch the Windows Find dialog - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=9&categories=System
* How to read the mouse cursor position - by m3Rlin
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=9&categories=System
* Accessing DataBase via 3rd server - by Vladimir Orlenko
Writing n-tier Application for accessing client's app to DataBase
without installing Client of Database via 3rd server using Indy.
http://www.delphi3000.com/articles/article_3310.asp
* Understanding VisualCLX - Max Kleiner (KYLIX)
Beginning with Kylix requires learning about signals and slots, the
way Linux/Qt deals with events and the Qt-library.
http://www.delphi3000.com/articles/article_3311.asp
* Top Modeling/CASE Tools - by Zarko Gajic
What are the best UML tools on the market? There are a lot, providing
an interesting array of features. Here's a list of suggested tools to
make your Delphi developer days easier.
http://delphi.about.com/library/toppicks/aatpmodelcase.htm
* Simple HTML page scraping with Delphi - by Zarko Gajic
Shows the techniques nedded to download an HTML page from the net,
do some page scraping (using regular expressions for pattern matching)
and present the information in more *situation-friendly* manner.
http://delphi.about.com/od/networking/a/html_scraping.htm
* Making Delphi Interoperate with other languages - by Zarko Gajic
How to make Delphi and Delphi apps interoperate with apps written in
different programming languages. How to convert the code from other
languages to Delphi Pascal.
http://delphi.about.com/cs/delphiandothers/index.htm
* Creating ASP Objects with Delphi - by Zarko Gajic
If you use the MS IIS web server you will have noted its support for
ASP. Having created COM objects with Delphi you can easily call your
components from ASP scripts.
http://delphi.about.com/cs/aspwithdelphi/
* New IDE Building Blocks - by Zarko Gajic
Exploring ways to extend the Delpih IDE. Including portability issues,
IDE Packages, Desktop Windows and learn to write Design Windows.
http://delphi.about.com/library/weekly/aa033099.htm
* Using ADO.NET datasets in Delphi - by Zarko Gajic
If you've experimented with Web Services you might have seen some .NET
based services which return data in the default XML format from
ADO.NET. So you end up with XML but with no clue what to do with it!
http://delphi.about.com/cs/websnap/index.htm
* Data Exchange using XML and Delphi - by Zarko Gajic
You have a client-server application with data access via ADO or BDE.
It works great on a desktop or on a corporate intranet but Now your
clients want to access data remotely across a WAN, or the Internet...
http://delphi.about.com/library/weekly/aa072500a.htm
* Interview with Chad Z. Hower - by SwissDelphiCenter
Interview with Chad Hower ("Kudzu") the original author and project
coordinator for Indy, 110+ components included with Delphi 6 & Kylix.
http://www.swissdelphicenter.ch/en/chadhower.php
* How to find all classes registered by a form class?
http://www.swissdelphicenter.ch/en/showcode.php?id=1218
* How to Removing the todays date display from a TDateTimePicker?
http://www.swissdelphicenter.ch/en/showcode.php?id=1219
* How to make some Days bold in the TMonthCalendar?
http://www.swissdelphicenter.ch/en/showcode.php?id=1220
* How to use Base64 encoding and decoding?
http://www.swissdelphicenter.ch/en/showcode.php?id=1223
* How to saving several controls to one single file?
http://www.swissdelphicenter.ch/en/showcode.php?id=1224
* How to show my own help dialog when user clicks biHelp border icon?
http://www.swissdelphicenter.ch/en/showcode.php?id=1225
* How to tile a non-MDIframe window with a backgrund bitmap?
http://www.swissdelphicenter.ch/en/showcode.php?id=1226
* How to set a date of a TDateTimePicker to blank?
http://www.swissdelphicenter.ch/en/showcode.php?id=1227
* How to get a list of a printer's capabilities?
http://www.swissdelphicenter.ch/en/showcode.php?id=1228
* How to hide properties in the IDE?
http://www.swissdelphicenter.ch/en/showcode.php?id=1229
* How to show in-place Tooltips in a TListBox?
http://www.swissdelphicenter.ch/en/showcode.php?id=1230
* How to check or uncheck a Checkbox in another window?
http://www.swissdelphicenter.ch/en/showcode.php?id=1231
* How to Create a DBExpress-Connection at Runtime?
http://www.swissdelphicenter.ch/en/showcode.php?id=1234
* How to Set/Get Accessibility Time-out Periods?
http://www.swissdelphicenter.ch/en/showcode.php?id=1235
* How to draw a bounding box with the mouse?
http://www.swissdelphicenter.ch/en/showcode.php?id=1236
* How to retrieve information about the current keyboard?
http://www.swissdelphicenter.ch/en/showcode.php?id=1237
* How to draw a highlight box around the control under the mouse?
http://www.swissdelphicenter.ch/en/showcode.php?id=1238
* How to retrieve the handle to the Windows Shell window?
http://www.swissdelphicenter.ch/en/showcode.php?id=1239
* How to get handle to the window that ownes the taskbar buttons (NT)?
http://www.swissdelphicenter.ch/en/showcode.php?id=1240
* How to change the Button Captions in MessageDlg?
http://www.swissdelphicenter.ch/en/showcode.php?id=1241
* How to transfer strings, images (streams) between processes?
http://www.swissdelphicenter.ch/en/showcode.php?id=1242
* How to Encrypt/ Decrypt a String?
http://www.swissdelphicenter.ch/en/showcode.php?id=1243
* How to extract numbers from a string?
http://www.swissdelphicenter.ch/en/showcode.php?id=1244
* How to use MAPI to send an EMail with Attachements?
http://www.swissdelphicenter.ch/en/showcode.php?id=1246
* How to show a miniature view of a Webpage in TWebbrowser?
http://www.swissdelphicenter.ch/en/showcode.php?id=1247
* How to tell if a folder is shared?
http://www.swissdelphicenter.ch/en/showcode.php?id=1248
* How to check if a page in TWebbrowser is secure (SSL)?
http://www.swissdelphicenter.ch/en/showcode.php?id=1250
* How to check if a page in TWebbrowser is on a local drive?
http://www.swissdelphicenter.ch/en/showcode.php?id=1251
* How to set/get the background color of a page in TWebbrowser?
http://www.swissdelphicenter.ch/en/showcode.php?id=1254
* How to change the scrollbar colors of TWebBrowser?
http://www.swissdelphicenter.ch/en/showcode.php?id=1255
* How to obtain the text of a specified window's title bar?
http://www.swissdelphicenter.ch/en/showcode.php?id=1257
* How to change the default cell selection color in a TStringGrid?
http://www.swissdelphicenter.ch/en/showcode.php?id=1258
* How to link a TFilterComboBox with a TShellListView?
http://www.swissdelphicenter.ch/en/showcode.php?id=1259
* How to save a font to the registry/a stream?
http://www.swissdelphicenter.ch/en/showcode.php?id=1260
* How to Calculate Easter Day for a specified year?
http://www.swissdelphicenter.ch/en/showcode.php?id=1262
* How to capture a column resize event in a TListView?
http://www.swissdelphicenter.ch/en/showcode.php?id=1264
* Determine if your program/Service is running under the System account
http://www.swissdelphicenter.ch/en/showcode.php?id=1265
* How to save many streams in a (compressed, encrypted) file?
http://www.swissdelphicenter.ch/en/showcode.php?id=1266
* How to encrypt a image?
http://www.swissdelphicenter.ch/en/showcode.php?id=1268
* How to use a Syntax Highlighter?
http://www.swissdelphicenter.ch/en/showcode.php?id=1270
* How to save a file to a TBlobStream and read it back?
http://www.swissdelphicenter.ch/en/showcode.php?id=1271
* How to check if a service is running?
http://www.swissdelphicenter.ch/en/showcode.php?id=1275
* How to implement AfterShow, AfterCreate events?
http://www.swissdelphicenter.ch/en/showcode.php?id=1276
* How to get infos about aliases?
http://www.swissdelphicenter.ch/en/showcode.php?id=1277
* How to automatically insert a GUID into the code editor?
http://www.swissdelphicenter.ch/en/showcode.php?id=1280
* How to register or unregister an OCX/ActiveX?
http://www.swissdelphicenter.ch/en/showcode.php?id=1281
* How to check for prime numbers
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=10&categories=Math
* How to get the battery life
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=11&categories=Hardware
* How to resolve a host name
http://www.delphifaq.net/modules.php?op=modload&name=FAQ&file=index
&myfaq=yes&id_cat=12&categories=Internet/LAN
Tutorials
=========
* Create an effective Data Model for your Database
The three phases of the data modeling process will help you create an
effective business database that transcends applications and won't
need reworking when new data is introduced. Learn about these three
phases and get more data modeling resources.
http://builder.com.com/article.jhtml?id=u00320020605dol01.htm
* Use SQL Subselects to consolidate queries - by Shelley Doll
Are normalized data structures giving you problems? Learn how to use
the SQL subselect statement and handle your database like a pro!
http://articles.techrepublic.com.com/5100-10878_11-1045787.html
* Creating Custom Delphi Components: Inside and Out - Alistair Keys
This tutorial explains component writing which should result in more
code reuse. It goes over properties, events and methods, and also how
to install components. The final part is about Object-Oriented design.
http://delphi.about.com/library/bluc/text/uc061102a.htm
* Remedial XML: Learning to play SAX - by Lamont Adam
Using DOM to parse XML documents you will notice that performance
suffers when dealing with large documents. This is endemic to DOM's
tree-based structure so where performance is problematic you can use
the Simple API for XML (SAX). This part of the Remedial XML series
introduces the SAX API and provides some links to implementations.
http://builder.com.com/article.jhtml?id=u00220020527adm01.htm
* Remedial XML: For Further Reading - by Lamont Adams
Wraps up this six-part remedial XML series with a list of suggested
Web resources to further your studies.
http://articles.techrepublic.com.com/5100-10878_11-1044662.html
Other Links
===========
* Press Release: Borland Breaks New Ground with C++Technology for Linux®
Kylix 3 delivers the first C/C++ and Borland Delphi integrated rapid
application development solution for creating database, GUI, Web, and
Web Services applications for the Linux® operating system.
http://community.borland.com/article/0,1410,28896,00.html
* Vote in Linux Journal's 2002 Readers' Choice awards
Vote for your favorite Linux related products.
http://community.borland.com/article/0,1410,28921,00.html
* Web Services: Messiah or Mirage? - by David Braue
Software vendors keep telling us that Web services are the answer but
noone knows the question. Explore the state of Web services today.
http://builder.com.com/article.jhtml?id=u00420020626gcn01.htm
* Programming within your comfort zone - by Shelley Doll
It's nice to be the expert but as time passes & technologies advance,
your area of expertise shrinks noticeably. If you never stop to look
outside your comfort zone you could be using obsolete techniques and
spending time programming solutions that have already been solved.
http://builder.com.com/article.jhtml?id=u00420020620dol01.htm
________________________________________________________________________
YOU CAN HELP US
We need your help to keep this newsletter going and growing. You can
help by referring the newsletter to your colleagues:
http://www.latiumsoftware.com/en/pascal/delphi-newsletter.php
Or you can help by voting for us in some or all of these rankings to
give more visibility to our web site and thus increase the number of
subscriptions to this newsletter:
http://www.programmingpages.com/?r=latiumsoftwarecomenpascal
http://top100borland.com/in.php?who=20
It's just a few seconds for you that REALLY mean a lot to us.
Don't forget we also need articles for this newsletter and there is a
prize for one of the authors in each issue. All articles will be
considered but we are particularly interested in articles about Kylix
because there is so little available online to help Kylix developers.
Send articles to <eds2008 @ latiumsoftware.com>.
We are also looking for shareware authors who would like to offer their
components or applications as prizes for articles in the newsletter. In
return you will be promoted in this newsletter and the Latium Software
web site. For more information contact Dave <irongut @ vodafone.net>.
________________________________________________________________________
If you haven't received the full source code examples for this issue,
you can get them from http://www.latiumsoftware.com/en/file.php?id=p38
________________________________________________________________________
This newsletter is provided "AS IS" without warranty of any kind. Its
use implies the acceptance of our licensing terms and disclaimer of
warranty you can read at http://www.latiumsoftware.com/en/legal.php
where you will also find a note about legal trademarks. Articles are
copyright of their respective authors and they are reproduced here with
their permission. You can redistribute this newsletter as long as you do
it in full (including copyright notices), without changes, and gratis.
________________________________________________________________________
Group home page: http://groups.yahoo.com/group/pascal-newsletter/
Subscribe/join: pascal-newsletter-subscribe@yahoogroups.com
Unsubscribe/leave: pascal-newsletter-unsubscribe@yahoogroups.com
Report spam/abuse: abuse@yahoogroups.com
Problems with your subscription? eds2008 @ latiumsoftware.com
________________________________________________________________________
Latium Software http://www.latiumsoftware.com/en/index.php
Copyright (c) 2002 by Ernesto De Spirito. All rights reserved.
________________________________________________________________________
|