Pascal Newsletter #42
The full source code examples of this issue are available for download.
![]() |
![]() |
Pascal Newsletter #42 - 16-JAN-2003 Contents 1. A few words from the editor 2. TDataSet => Excel (No OLE or EXCEL required) Class TDataSetToExcel 3. Distributed applications, the easy way (I) How to do data exchange between processes in distributed applications 4. Calls to Qt cause installation problems for components in Kylix BCB IDE 5. Inline Assembler in Delphi (VI) - Calling external procedures 6. Forums / mailing lists 7. Delphi on the Net - Components, libraries and utilities . Freeware - Articles, tips and tricks - Tutorials - Other links ________________________________________________________________________ 1. A few words from the editor Happy New Year! It's been a long time since the last issue. Sorry for that, but in order to compensate, at least for the first part of the year there will be two issues of the newsletter per month. I'm proud to announce that the newsletter has reached almost 7,500 subscribers, and the English Edition is on top of the Delphi category in Yahoo! Groups: http://dir.groups.yahoo.com/dir/Computers___Internet/ Programming_Languages/Delphi?show_groups=1 By the way, delphi-en --our forum for intermediate level Delphi programmers-- has nearly 1,000 subscribers and is listed in the tenth place in the same page. Last month I was very happy to see the Pascal Newsletter was mentioned as a "Great Delphi Newsletter" in the Delphi3000.com Newsletter #100. I appreciate this mention very much since I'm a big fan of D3K and I consider it to be the best Delphi knowledge site on the net. You can see Dave always includes references to http://www.delphi3000.com articles in the Delphi on the Net section. I'd like to thank Mike Heydon, Eugene Mayevski and Richard Winston for contributing articles for this issue, and I'm glad to award Eugene Mayevski a license of llPDFLib: * llPDFLib v1.1 - by llionsoft, Shareware ($70, $280 with source) llPDFLib is pure Object Pascal library for creating PDF documents. Does not use any DLL and external third-party software to generate PDF files. Library consists of TPDFDocument component with properties and methods like Delphi's TPrinter but designed to generate a PDF file. http://www.llion.net/ For the next issue, we have available the following prizes for our contributors: * SDL Component Suite 7.0 - by Software Development Lohninger ($99) The SDL Component Suite provides a wide range of components for science and engineering, e.g. math, statistics, chemistry, charts, data visualization, Fourier transform (FFT), 3D plots, geographic maps, curve fitting, etc. Available for Delphi 3-7 and BCB 4-6. http://www.lohninger.com/sdlindex.html * TSDBGridFooter v2.0 by Jovan Sedlan, Shareware ($74.50) This component is a powerful tool that provides automatic calculations for your DBGrid and displays that information in a customizable footer under the grid. It is designed to work with TSDBGrid (also included) although you can use it with any TCustomDBGrid descendant. http://www.sedlan.com/dbgrid_footer.php In the news, at the Borland web site there is an official run-time patch for Delphi 6, and an update to the Delphi for .NET preview (available for download to registered users of Delphi 7). Check the Other Links section for a short description and the corresponding URLs. Ah, before I forget, in the last issue I made a mistake in my article about Inline Assembler. Credits to Bob Richardson for being the first in letting me know that TClass2 can't inherit from itself. Oops! :-) Well, I hope everyone realized that what I wanted to write in the declaration was: TClass2 = class(TClass1) I hope you enjoy this issue. Regards, Ernesto De Spirito eds2004 @ latiumsoftware.com __________________ Collaborated in this issue: Dave Murray and Charl Linssen ________________________________________________________________________ Object Inspector 1.2 (by Greatis Software) is a suite of components that includes a special component for easy and convenient access to all published properties and events of any component, a common inspector that can be used for inspecting everything in your application, and a ready-to-use component inspector that mimics the IDE Object Inspector. It has different paint styles, as well as font and color customization features. For Delphi 3-7 and BCB 5-6. http://www.greatis.com/objinsp.htm ________________________________________________________________________ 2. TDataSet => Excel (No OLE or EXCEL required) Class TDataSetToExcel Copyright (c) 2002 Mike Heydon This class will produce an Excel Spreadsheet from a TDataSet. No OLE is required or Excel Installation needed to create the file. The one problem with Excel OLE is that is tends to be rather Sloooow. The class uses standard Delphi I/O functions and is considerably faster than the OLE calls. Example: var XL : TDataSetToExcel; begin XL := TDataSetToExcel.Create(MyQuery,'c:\temp\test.xls'); XL.WriteFile; XL.Free; end; The columns are neatly sized. Numbers are formatted in "Courier" and obey "###,###,##0.00" for floats and "0" for integers. Dates are formatted "dd-MMM-yyyy hh:nn:ss". Column headers are in Bold and are boxed and shaded. __________________ EDITOR'S NOTE: This class is provided in the belief that it is somehow useful as it is for some purposes, but you have to be warned that this is just a very BASIC class and it needs many enhancements. For example, the cell formatting strings are hardcoded, so the class doesn't support international locales. The class would need properties for various cell formats, e.g. property FormatText : string property FormatInt : string property FormatFloat : string property FormatDateTime : string property FormatDate : string property FormatTime : string or Pagebreaks methods, Cell colors... the list is endless! Please don't email the author requesting features. The class is provided "AS IS". ________________________________________________________________________ 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-7 and C++ Builder 3-6. http://www.jfactivesoft.com/ ________________________________________________________________________ 3. Distributed applications, the easy way (I) How to do data exchange between processes in distributed applications By Eugene Mayevski <Mayevski @ eldos.org> There are many ways of transferring data from one process to another. All those methods have some advantages, but also some drawbacks. Is there a way to have a flexible data exchange system and don't go to deep into technical details? When your application consists of more than one process, you face the question of optimizing communications between these processes. Such distributed applications include computational grids, peer-to-peer networks, client-server and 3-tier business applications. They all use different ways of sending information to other processes and receiving responses. Also, there are many types of regular applications which would benefit in splitting them in two or more parts. These are applications that perform background tasks like monitoring web sites, filtering Internet traffic, scanning files and mail for viruses to name a few. Usually the business logic can be easily separated from user interface (UI) and the UI can be loaded only on demand. All these applications have something in common. This is the necessity to provide some way for data exchange between different parts of the application. There are many ways of data exchange, which are used in different situations. Most frequently used in Windows world are (starting from the simplest): 1) Windows messages; 2) Windows mailslots; 3) Memory-mapped files (MMF); 4) TCP or UDP sockets; 5) COM/DCOM Each of these methods has its own advantages. Windows messages are very easy to use and work with. Mailslots are much like Windows messages but work in local networks. Memory-mapped files are a quick and relatively easy way to exchange data when you can't work with window handles (ex. service applications, console applications). Sockets are universal and cross-platform. COM/DCOM is object-oriented and quite high-level. However each of these methods has its own drawbacks. COM, Windows messages and memory-mapped files are usable within single computer only (MMF files can be opened on network drives, but the data integrity and actuality is not guaranteed). Mailslots and UDP sockets are not reliable (this means that when you send data, you can't easily query whether the recipient has received the data successfully). TCP sockets can be used in wide variety of scenarios, but there's one problem – they are stream- only. It is up to your application to divide stream of data into data blocks and process these blocks. DCOM is a sophisticated solution that is sometimes hard to setup and maintain, and it becomes a nightmare when you start dealing with security. No need to say that all the described methods, except sockets (and expensive 3rd-party implementations of DCOM created for Unix-based systems), are Windows-only. If you create an application that should work not only on Windows platform, you are stuck to sockets. Sockets are a very powerful solution as they let you control almost all aspects of data delivery – how and when the data is sent, how long the application waits for a reply, and other things. One negative aspect of this flexibility is that you MUST control these aspects (maybe not all, but most of them). Let's now return to Windows messages. They are really simple – a structure with several fields that can be filled with data and sent to the recipient with one call. And when you need to pass some data block, you can use WM_COPYDATA message. "How nice it would be if there were methods to use the same technique both on the same computer and across networks", you might think. We thought the same. Unfortunately, it is not possible... Well, until now. Now you can combine the simplicity of the Windows messaging system with the power and flexibility of socket communications or memory-mapped files using MsgConnect framework. MsgConnect encapsulates low-level operations used to establish communication and exchange information, and provides a simple API that looks very much like Windows messaging. The sequence of actions necessary to add cross-platform communications to your application will fit into 20 lines of code: 1) create an instance of Messenger object (used to send a message); 2) create an instance of Transport object (used to deliver messages to recipients. You will need one instance of transport for each transport you use, be it sockets or MMF); 3) create an instance of Queue object (used to receive messages); 4) link these objects together with couple of method calls; 5) define a handler for event which is fired when the message is received. That's all. You can start sending and receiving messages. Why would use of MsgConnect be easier than using conventional ways of communications? First of all, MsgConnect hides the details, but keeps them available for use. The framework lets you fine-tune transport objects to achieve maximum performance for any type of application, from occasional messaging to heavy data exchange. And if you don't want to go into the details, MsgConnect will work perfectly with the default settings. Of course, you will need to design the protocol, i.e. define what messages are used for different purposes in your application, and this will be a part of application business logic. You won't need to dig into the details of the TCP protocol implementation or manage the security for MMF. Second thing is that message exchange is universal. With MsgConnect the message can contain any binary data and the recipient can change this data block and send it back with the same message. In other words, the sides of the data exchange can do round-trip data transfer with just one message. The result is that MsgConnect can be used in both single- directional and bi-directional communications without limitations. Third benefit is that to change the communication from local computer to network you only need to add another transport object and change the address to which the messages are delivered. You don't need to implement another algorithm or handle another low-level algorithm. Forth, your application can exchange information with applications running on different platforms. MsgConnect supports a wide range of platforms (currently Windows, Windows CE, Linux, Unix, Java, .NET with more to come in near future). And last but not least – whether you develop a free open-source project or a huge proprietary system, MsgConnect has a suitable license for you. It's available as open-source and provides additional services to the users who obtain the commercial license. __________________ MsgConnect is a joint endeavour of EldoS Group (http://www.eldos.org) and TamoSoft (http://www.tamos.com), and it can be obtained with full source code free of charge at http://www.msgconnect.com (either licensed as GPL or as Evaluation, upgradable to a Commercial license). ________________________________________________________________________ Greatis Runtime Fusion includes Form Designer Pro ($ 49.95) and Object Inspector Pro ($ 49.95), two flagship Delphi-related products of Greatis Software, and costs $89.90 - Save $10 and get additional demos. Let the user design forms at runtime. >>>>>>> http://www.greatis.com/runtime.htm ________________________________________________________________________ 4. Calls to Qt cause installation problems for components in Kylix BCB IDE By Richard Winston Abstract: If a component written in Delphi makes a call to Qt, installing the component in the Kylix BCB IDE can be difficult. This article describes how to overcome this problem. I had problems with a component I wrote that used calls to Qt. The procedure that caused the problems wrote Text at location (X,Y) at an angle specified by Angle using the following code. Uses Qt, QGraphics; procedure TRbwRuler.PaintRotated(const X, Y, Angle: double; const Text: string); begin Canvas.Start; QPainter_translate(QPainterH(Canvas.Handle),X,Y); try QPainter_rotate(QPainterH(Canvas.Handle),Angle); try Canvas.TextOut(0,0,Text); finally QPainter_rotate(QPainterH(Canvas.Handle),-Angle); end; finally QPainter_translate(QPainterH(Canvas.Handle),-X,-Y); Canvas.Stop; end; end; This worked just fine in the Kylix Delphi IDE, but it wouldn't compile with the Kylix C++ IDE. The error messages were [Linker Error] Unresolved external 'Qt::QPainter_translate( QT::QPainter *, double, double)' referenced from QrbwRuler.o and [Linker Error] Unresolved external 'Qt::QPainter_rotate( QT::QPainter *, double, double)' referenced from QrbwRuler.o I could write a similar component in the Kylix C++ IDE using code like this. void __fastcall TRbwRuler::PaintRotated(const double X, const double Y, const double Angle, const AnsiString Text) { Canvas->Start(); Qt.QPainter_translate((QPainter__*)Canvas->Handle,X,Y); __try { Qt.QPainter_rotate((QPainter__*)Canvas->Handle,Angle); __try { Canvas->TextOut(0,0,Text); } __finally { Qt.QPainter_rotate((QPainter__*)Canvas->Handle,-Angle); }; } __finally { Qt.QPainter_translate((QPainter__*)Canvas->Handle,-X,-Y); Canvas->Stop(); }; } I could get components that worked in either IDE by declaring a virtual, abstract procedure and then declaring two new components - one for each IDE - and overriding the abstract procedure with the code that works in that IDE. However, if you want to use visual form inheritance in the C++ IDE to inherit from forms created in the Delphi IDE, this doesn't work. I could view such forms in the IDE but when I tried to compile the project, it reported linker errors. This appeared to be because the Delphi and C++ versions of the component really weren't the same thing even though they had identical names and functionality. This is really the same sort of problem I was trying to avoid in creating the two components in the first place. The C++ IDE and Delphi IDE appear to need different versions of QPainter_translate and QPainter_rotate. The Delphi IDE appears to wants the one declared in Qt.pas whereas the C++ IDE appears to want the one declared in qpainter.hb. My final solution was to install the component in the C++ IDE as a package. Select Component|Install Packages... Click the Add... Button. Select a *.so file generated by the Delphi IDE. Click the Open button. Click the OK button. For each package, you need to generate an *.a file. File|CloseAll File|New|Other|Library File|Save Project As... and save with the same root name as the Package file for the Delphi IDE Project|Add to Project Select the *.so file. File | Save All Now you are ready to actually build the library, so: Project | Build Click the OK button. __________________ Richard Winston develops graphical interfaces for ground-water modeling programs for the U.S. Geological Survey. ________________________________________________________________________ When was the last time you voted for the Pascal Newsletter? Please support this initiative voting for us in The Programming Top 100! http://www.sandbrooksoftware.com/cgi-bin/TopSite2/rankem.cgi?id=latium ________________________________________________________________________ 5. Inline Assembler in Delphi (VI) - Calling external procedures API functions and the Stdcall calling convention ================================================ API functions are called transparently from inline assembler with the CALL statement. However, we must take into account that passing parameters to API functions is different since they normally use the Stdcall calling convention, instead of the Register calling convention, which is the one we've seen so far since it is the default convention. In the Stdcall calling convention, all parameters are passed on the stack, from right to left, i.e. the last (rightmost) parameter is pushed first, and the first (leftmost) parameter is pushed last, so it'll the one on top of the stack. Here is an example of a procedure that calls an API function: procedure HideForm(Handle: THandle); // Windows.ShowWindow(Handle, SW_HIDE); asm push SW_HIDE // push 0 // Pass second parameter push Handle // push eax // Pass first parameter call Windows.ShowWindow // Call the API ShowWindow end; If we have to call a method that uses the stdcall convention, remember that the Self pointer is an invisible first parameter, so it'll be pushed last on the stack. If we have to write functions that use the stdcall convention, there's nothing special we should worry about. The compiler will always create a stack frame and references to parameter names will be converted into addresses relative to the base pointer: function AddAndMultiply(i1, i2, i3: integer): integer; stdcall; asm // ==> push ebp; mov ebp, esp // Result := (i1 + i2) * i3; mov eax, i1 // mov eax, [ebp+8] add eax, i2 // add eax, [ebp+12] imul i3 // imul [ebp+16] end; // ==> pop ebp; ret 12 This is a sample call for the function: asm // a := AddAndMultiply(1, 2, 3); // result should be 9 push 3 push 2 push 1 call AddAndMultiply mov a, eax end; After entering the function, the stack would look like this: | | +----------------+ | Old EBP | [EBP], [ESP] +----------------+ | Return Address | [EBP+4] +----------------+ | i1 = 1 | [EBP+8] +----------------+ | i2 = 2 | [EBP+12] +----------------+ | i3 = 3 | [EBP+16] +----------------+ | | C/C++ libraries and the Cdecl calling convention ================================================ Sometimes we need to access functions in object files (.OBJ), static libraries (.LIB) or dynamic libraries (.DLL) written in C or C++, and quite frequently these functions use the Cdecl calling convention. It is very much like the Stdcall convention, but the stack should be cleaned by the caller, i.e., the caller should pop the parameters it pushed, or -better- increment the stack pointer. function AddAndMultiply(i1, i2, i3: integer): integer; cdecl; asm // ==> push ebp; mov ebp, esp // Result := (i1 + i2) * i3; mov eax, i1 // mov eax, [ebp+8] add eax, i2 // add eax, [ebp+12] imul i3 // imul [ebp+16] end; // ==> pop ebp; ret Notice in the comment for the last line that the function doesn't move the stack pointer as it did in the previous example that used the Stdcall convention, so the caller is the one who is responsible for that. This is a sample call for the function: asm // a := AddAndMultiply(1, 2, 3); // should be 9 push 3 push 2 push 1 call AddAndMultiply add esp, 12 // clean the stack mov a, eax end; Notice that if the parameters were of type Byte instead of Integer, we should still move the stack pointer by 12 bytes since each parameter would take 32 bits (4 bytes) anyway. The Pascal calling convention ============================= Many C/C++ programmers prefer the Pascal calling convention over the Cdecl calling convention because it is more compact and also faster since the called function clears the stack in the RET statement, as it happens in the Stdcall convention. The Pascal convention is like the Stdcall convention, but parameters are passed left-to-right instead of right-to-left, i.e. the first (leftmost) parameter is pushed first, and the last (rightmost) parameter is pushed last: function AddAndMultiply(i1, i2, i3: integer): integer; pascal; asm // ==> push ebp; mov ebp, esp // Result := (i1 + i2) * i3; mov eax, i1 // mov eax, [ebp+16] add eax, i2 // add eax, [ebp+12] imul i3 // imul [ebp+8] end; // ==> pop ebp; ret 12 Notice how the addresses of the parameters are translated different than in the previous examples. This is a sample call for the function: asm // a := AddAndMultiply(1, 2, 3); // should be 9 push 1 push 2 push 3 call AddAndMultiply mov a, eax end; After entering the function, the stack would look like this: | | +----------------+ | EBP | [EBP], [ESP] +----------------+ | Return Address | [EBP+4] +----------------+ | i3 = 3 | [EBP+8] +----------------+ | i2 = 2 | [EBP+12] +----------------+ | i1 = 1 | [EBP+16] +----------------+ | | ________________________________________________________________________ 6. Forums / mailing lists 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://groups.yahoo.com/group/components/ Subscription: http://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://groups.yahoo.com/group/software-developers/ Subscription: http://groups.yahoo.com/group/software-developers/join software-developers-subscribe@yahoogroups.com ________________________________________________________________________ 7. Delphi on the Net By Dave Murray <irongut @ vodafone.net> Components, libraries and utilities =================================== Shareware/Commercial -------------------- * Greatis Form Designer v3.4 - by Greatis Software, Shareware ($49.95) It's a runtime form designer that allows you to move and resize any control on your form. You don't need to prepare your form to use Form Designer. Just drop TFormDesigner component onto any form, set Active property to True and enjoy! For Delphi 4-7 and BCB 3-6. http://www.greatis.com/formdes.htm Freeware -------- * ImageFileLib v1.00 - by Michael Vinther (with source) With this library, Delphi programs can read and write JPEG 2000, PNG, ICO, CUR and PCX images. RAS, PNM, PGM, PPM, HIPS images can be loaded but not created. Both lossy and lossless coding of JPEG 2000 images are supported. In this library also provides support for 24 bit and 256 color palette icons and cursors. http://www.logicnet.dk/lib/ * TBalloonControl v1.0 - by JWB Software (with source) The TBalloon component provides an easy interface to balloon-shaped tooltips which appear more and more in modern software. You can choose to attach a balloon-window to a control, but you can also place it anywhere on your desktop, just define the coordinates of the point. http://people.zeelandnet.nl/famboek/delphi/balloon.html * TMSNPopUp v5.0 - by JWB Software (with source) The TMsnPopUp component is created to mimic the behavior of the popup windows that can be seen in MSN/Windows Messenger from Microsoft. But it even gets better, because TMsnPopup is fully customizable, so you can give it your own look and feel. http://people.zeelandnet.nl/famboek/delphi/msnpopup.html * TXMLSerializer v2.0 - by JWB Software (with source) The TXMLSerializer component can save Delphi objects and components to disk in XML-format. Being an open format, XML has many advantages, it is a good way to save information in a readable form. You can even save complete forms as XML-files. http://people.zeelandnet.nl/famboek/delphi/xmlserializer.html * Delphi SmartCard Component v0.91 - by N Hüttisch (with source) Access any SmartCardReader which has drivers for the Microsoft SmartCard API (PC/SC) from Delphi. Easy-to-use routines to find the reader, to get informed if a card is inserted/removed and to send and receive data to / from the reader. http://www.nobbi.com/download.htm#delphi * WinTab Interface + Sample Component v1.0 - by Qr Li (with source) Delphi API translation for WinTab, the standard pointing device interface to support tablets. http://www.torry.net/vcl/system/otherhardware/wintab32.zip * WallSwap v1.1 - by Conspiracy Software (Delphi source on request) WallSwap, the automatic wallpaper changer for Windows. Give WallSwap a list of files or point it at an entire directory of pictures and it will automatically cycle your Windows desktop background through them. Features include: Support for bmp, gif, jpeg and PNG images; Center, Stretch or Tile your wallpaper; Use HTML web pages as your wallpaper; Change wallpaper every time or once daily; Compatible with Active Desktop. TopQualityFreeware.com Rating 5/5! http://www.winsite.com/bin/Info?6500000036556 * ClassExplorer Pro - by toolsfactory (with source) ClassExplorer Pro dramatically simplifies the development process by adding perfectly integrated code navigation, code creation and code documentation capabilities to your Delphi development environment. http://www.toolsfactory.com/download.shtml * deBold v2.2 - by Droopy Eyes Software (with source) These components make development with Bold for Delphi simpler. Bold is the MDA (Model Driven Architecture) product which was recently acquired by Borland and included with some versions of Delphi 7. These components are based on this framework and help the developer to perform automatic object validation, etc. http://www.droopyeyes.com/default.asp?mode=ShowProduct&ID=12 * DIB Controls v1.16 - by Droopy Eyes Software (with source) DIB Controls are a set of native Delphi VCL components based around a very fast DIB drawing engine (Device Independant Bitmap). The drawing engine utilises inline assembly language for optimum speed. This speed allows these features: Real-time zooming; Real-time rotation; Real- time alpha masking; 3 x 3 matrix filter (blur, sharpen, emboss, etc). http://www.droopyeyes.com/default.asp?mode=ShowProduct&ID=3 * FastStrings v2.6 - Droopy Eyes Software (with source) (DELPHI/KYLIX) A set of string routines for manipulating large strings at high speed. Includes Boyer-Moore searching algorithm, backwards string searching and a very high-speed alternative for StringReplace. http://www.droopyeyes.com/default.asp?mode=ShowProduct&ID=4 * Inno Setup v3.0.6 - by JR Software (with source) A free installer for Windows programs that rivals and surpasses many commercial installers in feature set and stability. Features include: Support for all 32-bit Windows versions; Creation of a single EXE or disk spanning; Standard wizard interface, including Win2k/XP style; Customizable setup types; Complete uninstall capabilities; Zip / bzip2 compression; Creation of shortcuts, registry and .INI entries; Silent install and uninstall. http://www.jrsoftware.org/isinfo.php * SQLyog v2.51 - by webyog SQLyog is an easy to use, compact and fast graphical tool to manage your MySQL database anywhere in the world. SQLyog was developed keep in mind the necessities of all who use MySQL as their preferred RDBMS. Whether you enjoy the control of handwritten SQL or prefer to work in a visual environment, SQLyog makes it easy for you get started and provides you with tools to enhance your MySQL experience. http://www.webyog.com/sqlyog/ Articles, tips and tricks ========================= * Overview of the VCL for .NET - by J Kaster, E Churchill and D Thorpe This article provides an overview of the architecture, design, and intent of the VCL for .NET included with the Delphi for .NET preview. http://community.borland.com/article/0,1410,29460,00.html * Building + Running Delphi for .NET projects using DLite - by M. Binder The Delphi for .NET preview included with Delphi 7 gives us a peek at the .NET world from the Delphi point of view. This article shows how to use DLite to help you build and run your Delphi for .NET projects. http://community.borland.com/article/0,1410,29077,00.html * How To Use Scanlines - by Leonel Togniolli This article shows a fast way to manipulate bitmaps without using the canvas : the scanlines. http://community.borland.com/article/0,1410,29173,00.html * Using Web Services with the Delphi for .NET preview command-line compiler - by Bob Swart This article shows how you can use existing Web Services with the preview command-line compiler Delphi for .NET. http://community.borland.com/article/0,1410,29486,00.html * Get TreeView Node By Text - by Zarko Gajic How to locate (search and select) a TreeView node given by node text. http://delphi.about.com/library/weekly/aa010703a.htm * Dephi components to access MySQL - by Zarko Gajic Overview of VCL components allowing you to access a MySQL database from Delphi using standard data controls without using BDE/ADO/ODBC. Plus a few MYSQL related tools. http://delphi.about.com/cs/toppicks/tp/aatpmysql.htm * Exchanging Data over the Network - by Zarko Gajic Examine two Delphi components: TServerSocket and TClientSocket both designed to let you read and write information over TCP/IP - thus enabling you to write network-aware applications. http://delphi.about.com/library/weekly/aa112602a.htm * Conspiracy Theory: .NET IS Borland's Is it possible that the whole .NET framework is Borland's idea? http://delphi.about.com/library/weekly/aa112902a.htm * How to encode / decode Base64 string? http://www.swissdelphicenter.ch/en/showcode.php?id=1524 * How to get the Internet Explorer typed urls? http://www.swissdelphicenter.ch/en/showcode.php?id=1521 * How to use URL highlighting in TRichEdit? http://www.swissdelphicenter.ch/en/showcode.php?id=1505 * How to show the select directory dialog and specify initial directory? http://www.swissdelphicenter.ch/en/showcode.php?id=1509 * How to make a flickerless animation using CopyRect? http://www.swissdelphicenter.ch/en/showcode.php?id=1536 * How to zoom the view of a TWebBrowser? http://www.swissdelphicenter.ch/en/showcode.php?id=1537 * How to follow the mouse in TMemo to set the cursor position? http://www.swissdelphicenter.ch/en/showcode.php?id=1538 * How to show a indeterminate ProgressBar in Win XP with PBS_MARQUEE? http://www.swissdelphicenter.ch/en/showcode.php?id=1541 * How to install Kylix when error -10 popups up - by m3Rlin www.delphifaq.net/modules.php?op=modload&name=FAQ&op=view&id=206 * How to register Kylix - by m3Rlin www.delphifaq.net/modules.php?op=modload&name=FAQ&op=view&id=207 * How to get an screen shot of a control - by m3Rlin www.delphifaq.net/modules.php?op=modload&name=FAQ&op=view&id=208 * How to move components at runtime - by m3Rlin www.delphifaq.net/modules.php?op=modload&name=FAQ&op=view&id=209 * How to use function overloading - by m3Rlin www.delphifaq.net/modules.php?op=modload&name=FAQ&op=view&id=210 * How to enter a NULL value - by m3Rlin www.delphifaq.net/modules.php?op=modload&name=FAQ&op=view&id=211 * How to copy your own application - by m3Rlin www.delphifaq.net/modules.php?op=modload&name=FAQ&op=view&id=212 * How to change the database name - by m3Rlin www.delphifaq.net/modules.php?op=modload&name=FAQ&op=view&id=213 * Save a webpage with images - by Ken Wilcox Ever wanted to duplicate the functionality of your browser and save a web page with images to disk? This example that does just that and you can pass in a progress bar to show the status of the operation. http://www.delphi3000.com/articles/article_3464.asp * MS Exchange API via Collaboration Data Objects - by Mike Heydon This is a vast subject that is beyond the scope of this article to fully detail here. This library provides the basic building blocks for someone who wants to develop using CDO. http://www.delphi3000.com/articles/article_3467.asp * How to Build Aggregate/Composite Components in Delphi - by Mark Miller http://www.delphi3000.com/articles/article_3468.asp * Handling Winsock errors - by Herbert Poltnik http://www.delphi3000.com/articles/article_3469.asp * Getting a Mac Address - The JEDI way - by Michael Brooks How to get the Mac Address for the local Windows PC (and possibly other computers on the LAN) without writing/translating a lot of code or relying completely on NetBios support. http://www.delphi3000.com/articles/article_3470.asp * Add Link to MsgBox (Updated) - by Fu-Hun-Ru Kaje-Ja http://www.delphi3000.com/articles/article_3473.asp * Building Real-Life Web Services - by Marc Hoffmann How to build a 'real-world' Web-Service with mixed method calls, data-aware connections, user-authorisation and session support. http://www.delphi3000.com/articles/article_3474.asp * TDataSet => Excel (No OLE or EXCEL required) - by Mike Heydon This class will produce an Excel Spreadsheet from a TDataSet. No OLE or Excel Installation is needed to create the file. The problem with Excel OLE is that it tends to be rather Sloooow. This class uses standard Delphi I/O functions and is considerably faster than the OLE. http://www.delphi3000.com/articles/article_3475.asp * Bmp into StatusBar - by Rodrigo Poli http://www.delphi3000.com/articles/article_3476.asp * Introductory Principles of Indexed Searching - by Jim McKeeth Describe the principles of an Indexed search engine (like google). How this works when a lot of text information is compressed into an index - so that a search can be done within a very short time. http://www.delphi3000.com/articles/article_3479.asp * WebSnap II: Interacting with the User - by Eber Irigoyen This article shows one way to allow the user to enter some data and use that to query your database. http://www.delphi3000.com/articles/article_3481.asp * Distributed applications, the easy way (I) - by Eugene Mayevski There are many ways of transferring data from one process to another. All those methods have some advantages, but also some drawbacks... http://www.delphi3000.com/articles/article_3489.asp * GetDocumentation for Type Library - by Nik Ozniev How get the Help String for a Type Library. http://www.delphi3000.com/articles/article_3490.asp * Calls to Qt cause installation problems for components in Kylix BCB IDE - by Richard Winston If a component written in Delphi makes a call to Qt, installing it in the Kylix BCB IDE can be difficult. This article describes how to overcome this problem. http://www.delphi3000.com/articles/article_3491.asp * Getting an exe File Type - by Lutfi Baran http://www.delphi3000.com/articles/article_3496.asp * Call a Procedure in an MDI Child - by Moof Foof How do I call a procedure or function in an MDI child when Delphi keeps telling me that TForm is not compatible with my TChildForm? http://www.delphi3000.com/articles/article_3498.asp * Build a Table Tree from Records to Objects - by Max Kleiner How to show a database self join in a TreeView. http://www.delphi3000.com/articles/article_3499.asp * How to Prevent an Application Being Closed by User - Manfred Suesens http://www.delphi3000.com/articles/article_3501.asp * Balloon Tooltips - by Calin Marinescu http://www.delphi3000.com/articles/article_3504.asp Tutorials ========= * Under Construction: Delphi, dbExpress And MySQL - by Bob Swart The BDE has had its day but some of the alternatives seem very costly (SQL Server at £1,612 for a 10-client standard version?). So this article looks at MySQL to see how easy it is to use with Delphi. Oh, and it's either free or cheap, depending on the licence you choose! http://www.thedelphimagazine.com/Samples/1540/1540.htm * DotNet Buzz Words Explained - by Alain "Lino" Tadros This article will explain the different buzz words in the DotNet world like CTS, CLS, VES, Managed Code, Managed Data, Unmanaged Code, Assemblies, Metadata, Manifest, Strong Names, etc.... http://community.borland.com/article/0,1410,29344,00.html * Write your own Reflector - by Alain "Lino" Tadros Want to write your own "ILDASM" or ".NET Reflector"? Start here by seeing how easy it is to get RTTI from .NET Assemblies. http://community.borland.com/article/0,1410,29423,00.html * Cloning ClientDatSet Cursors - by Cary Jensen When you clone a ClientDataSet cursor you create an additional pointer to a shared memory store and also an independent view of the data. This article shows you how to use this important capability. http://community.borland.com/article/0,1410,29416,00.html * Object Destructors and Finalizers in .NET Using C# and Delphi for .NET - by Brian Long This in-depth article looks at the role and usage of destructors (or equivalent) in the managed world of .NET. It examines in detail the areas of garbage collection, finalizers, the dispose pattern and language specifics, using both C# and Delphi for .NET. http://community.borland.com/article/0,1410,29365,00.html * Memory: from VCL via VCL for .NET to .NET - by Bob Swart How to migrate a VCL application (the game of Memory) to VCL for .NET and finally to WinForms on .NET, all using the Delphi for .NET Preview command-line compiler. http://community.borland.com/article/0,1410,29320,00.html * Hanging by a WebSnap Thread - by Nick Hodges Covers the basics of webmodule threading in both WebSnap and WebBroker as well as some strategies for dealing with the traps it can create. http://community.borland.com/article/0,1410,29300,00.html * Cleaning Your Delphi Code Errors - by Zarko Gajic A Beginner's Guide to Delphi Programming: Chapter 9. A discussion on Delphi design, run and compile time errors and how to prevent them. Also, take a look at some solutions to most common logic errors. http://delphi.about.com/library/weekly/aa121002a.htm * Send Binary Data in XML - by Brian Schaffner XML is generally thought of as a method for describing data using text. For example, elements are given text names, and element contents are usually text-based. There are times, however, when you'll want to put data other than text into your XML documents. http://builder.com.com/article.jhtml?id=u00220021127sch01.htm * Build and Customize Modular XML to Simplify XML Documents - E. Tittel Developers have been working with objects + modules for some time but now XHTML 1.1 introduces this concept to the XML world. Find out more about this important advancement and how to put it to use in your XML documents. http://builder.com.com/article.jhtml?id=u00320021210edt01.htm * Pass Parameters to XSL Templates Programmatically - Brian Schaffner Imagine you have a list of items in an XML document that you display to a user on a Web page. Users will select which column they want to sort on and the order of the sort. Using XSL to convert your XML document to HTML might sound complicated but passing parameters to the XSL template that performs the conversion is easier than you think. http://builder.com.com/article.jhtml?id=u00220021212sch01.htm * Best Practices to Enhance Your SQL Server Applications - Roy Hoobler Get the most out of your development efforts by familiarizing yourself with SQL Server. Follow these guidelines to build better applications. http://builder.com.com/article.jhtml?id=u00320021212RCH01.htm * Heavyweight vs. Lightweight Methodologies - by Jason P. Charvat In software development "lightweight" methodologies are gaining ground on more traditional "heavyweight" methodologies. Both have advantages and disadvantages and which one you choose depends on your needs. This article examines some key differences between them. http://builder.com.com/article.jhtml?id=u00420021016vat01.htm * Find + Dissect Errors with SQL Server's Bug Hunter - by Tony Patton Debugging is a necessary evil of software development and tools are available to make the process less painful. Microsoft provides the SQL Server Debug Interface to streamline SQL development. http://builder.com.com/article.jhtml?id=u00320021212ton01.htm Other links =========== * Delphi 6 Update: official run-time patch is available official patch that fixes some variant and a deadlock issue for Delphi 6's run-time package. http://community.borland.com/article/0,1410,29361,00.html * Borland Logo Stuff Buy Borland T-shirts, golfballs and other essential stuff. http://www.borlandstyle.com * Updated Delphi for .NET preview available for download Registered users of Delphi 7 can now download an update to the Delphi for .NET preview. http://community.borland.com/article/0,1410,29302,00.html * Quake2.exe Converted to Delphi - by Q2D The Quake II to Delphi Conversion Team is proud to announce that an important milestone has been reached: Quake2.exe has been fully converted to Delphi from the original C sources. All known conversion bugs have been corrected and the Delphi-compiled binary is able to run flawlessly using the original DLLs supplied with Quake II 3.20. Conversion of the game DLLs has almost been completed and we are now focusing on fixing conversion bugs in the source. We seeking any help we can get, visit the project's webpage at: http://www.sulaco.co.za/quake2/ ________________________________________________________________________ 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.sandbrooksoftware.com/cgi-bin/TopSite2/rankem.cgi?id=latium http://news.optimax.com/delphi/links/links.exe/click?id=70C517ECAE6E http://www.programmingpages.com/?r=latiumsoftwarecomenpascal http://www.top219.org/cgi-bin/vote.cgi?delphi&83 http://top100borland.com/in.php?who=20 http://top200.jazarsoft.com/delphi/rank.php3?id=latium http://213.65.224.200/cgi-bin/toplist.cgi/hits?Id=80 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 <eds2004 @ 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/download/p0042.zip ________________________________________________________________________ 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? eds2004 @ latiumsoftware.com ________________________________________________________________________ Latium Software http://www.latiumsoftware.com/en/index.php Copyright (c) 2003 by Ernesto De Spirito. All rights reserved. ________________________________________________________________________ |
The full source code examples of this issue are available for download.
![]() |
Errors? Omissions? Comments? Please contact us!






