1. Technology
Send to a Friend via Email

2008. Delphi Programming by Zarko Gajic

Delphi Programming Almanac For the Year 2008


UPlayer - FDA(C) Entry #40 - September 16, 2008
Tired of the "old" Notepad? Want to listen to the music and preview your pictures while editing a document? All in one application?

Graphical Progress Bar for Delphi applications - Partial / Continuous Move - September 15, 2008
When you do not know how many steps are needed for a progress bar - you might want to display a continuous bar - or a moving graphical object. The UpdateImageProgress takes a reference to a TImage control displaying a picture. By calling the procedure from inside, for example, a timer event (TTimer control), a graphical progress effect is achieved.

Display an Error Message for an OS Error Code - September 8, 2008
Delphi's SysErrorMessage returns an error message string that corresponds to the specified OS error code. OS error code can be retrieved by a call to GetLastError - last error reported by an operating system API call.

Tetravex Game - FDA(C) Entry #39 - September 2, 2008
Pong On Steroids features: single player mode; two player mode and even network mode!

Delphi Project Structure Folder Organization - Best Practice - September 1, 2008
One question I always ask myself when starting a new Delphi program - a project with two or more applications - is how to best layout all the Delphi files one project is made of?. Source code files (PAS) and DFM files should go into a source controls system. Executable should be placed into a separate folder. Third party tools (units) should have thier own folders. If I have BPLs or DLLs they also should have their own folder.

Pong On Steroids - FDA(C) Entry #38 - August 26, 2008
Pong On Steroids features: single player mode; two player mode and even network mode!

FirstDelimiter Delphi Function - Index of the First Occurence in a String of the Characters Specified - August 25, 2008
In the RTL there's a LastDelimiter function which returns the index of the last occurence in a string of the characters cpecified. What about the first delimiter - a function that would return the index of the first occurence in a string of the characters cpecified.

Get the Active (Focused) Control Outside of your Delphi application - August 19, 2008
When a user is working within your application, to grab the (handle of the) active control - the one with the input focus, you can simply use Delphi's "Screen.ActiveControl" property. Let's say you need to display something like a hint window below the currently active control - you would need to know the bounding rectangle (TRect) of this control that is not inside your application. Here's how using Delphi.

Prevent the System from Entering Sleep or Turning off the Display while your Application is Running - August 18, 2008
If you have a critical application running and you want to prevent the system from entering sleep or turning off the display while the application is running you need to call a Windows API function named SetThreadExecutionState.

15 Puzzle Game - FDA(C) Entry #37 - August 12, 2008
A well known hand game, called 15 puzzle, is a real gem. The problem is simple: there's a 4x4 filed with 16 pieces where one piece was removed. The remaining 15 pieces are put in random place...

Is your Delphi Application Running under Terminal Services as a Remote Session? - August 11, 2008
Windows Terminal Services environment enables users to access Windows-based programs that are installed on a terminal server, or to access the full Windows desktop. Users can connect to a terminal server to run programs, save files, and use network resources on that server.

Manipulate Web Forms using the TWebBrowser from Delphi code - August 5, 2008
A web form or a form on a web page allows a web page visitor to enter data that is, in most cases, sent to the server for processing. When using the web browser (TWebBrowser) Delphi control you can programmatically fill in web form fields and submit the fom - using Delphi code.

Need to Return a TStringList (any object) from a Delphi Function? - August 4, 2008
Do you know that a Delphi function can return any object type value, like a string list (TStringList) or a button (TButton)? If you know then I guess you also know that you have to be very careful when calling such a function.

The Building Blocks of a Delphi Project - Tools you Need Before You Start a New Delphi Project - July 29, 2008
From my experience I can suggest a few steps you should follow and a few tools you should have to master Delphi programming. The "steps" will help you get from the "I have an idea" to the full blown Delphi build application. The tools should be the building blocks of a Delphi project - tools you need before you start a new Delphi project.

Non Focusable Window - Create a Delphi Form that can Not be Activated - July 28, 2008
Before executing the CreteWindowEx, the CreateParams method is called - CreateParams allows you to change the default style of a window when it is created to suit your particular needs. A flag named WS_EX_NOACTIVATE can be used to create a window (form) that does not become the foreground window when the user clicks it.

New and Improved Screen Ruler (with Delphi source) - July 22, 2008
Screen Ruler supports shaping: you can easily change the shape of the ruler from the standard rectangular display to the "L shaped" display. Hit ALT+SHIFT+F12 and the ruler will follow the mouse without grabbing the input focus from your active window.

Where to Find Glyphs and Icons for a Delphi Application, Menu, Toolbar - July 21, 2008
A glyph in Delphi lingo is a bitmap image that can be displayed on a BitBtn or SpeedButton controls using the controls Glyph property. Glyphs and icons (and graphics in general) make your application user interface elements look professional and unique. Delphi controls and the VCL allow you to easily setup toolbars, menus and other user interface elements with custom graphics.

  1. About.com
  2. Technology
  3. Delphi
  4. Coding Delphi Applications
  5. Delphi Almanac 2008 - Tutorials, Articles, Tips and Tricks by Zarko Gajic - Year 2008

©2014 About.com. All rights reserved.