Posts Tagged ‘Delphi’

Digging deeper in Delphi

Saturday, March 28, 2009 7:55 No Comments

Threads are parts of a program that can be executed “simultaniously”. The are assigned running time by the operating system. Usually a Delphi project has just one thread (it is created without you knowing about it). This is the main thread. When it is terminated the whole program quits. Threads are useful if you want [...]

This was posted under category: Application Tags: ,

The most important functions in Delphi

Saturday, March 28, 2009 7:52 No Comments

In most Windows programs the most important functions can not only be reached through the menu but also via hotkeys and a toolbar. The hotkeys are very easy. Just set the “shortcut” property of a menu entry to anything you want. To get a toolbar in your form you need to add a ToolBar component [...]

This was posted under category: Application Tags: ,

Constants and Variables

Saturday, March 28, 2009 7:47 No Comments

Constants and Varibales are declared the same way as in Turbo Pascal:
const
MyConstant = 100;
MyOtherConst: real = 1.0;
var
MyVar: integer;
MySet: set of byte;
Note that (same as in Turbo Pascal) the variables are not initialized. You can however declare local typed constants (which you cannot do in standard Pascal):
procedure DoSomething;
const
MyLocalConstant: real= 1.0;
begin
//…
end;

Strings:
In 32bit Delphi (2.0 and 3.0) you [...]

This was posted under category: Application Tags: ,

Object Pascal in Delphi

Saturday, March 28, 2009 7:41 No Comments

Object Pascal is the programming language you use in Delphi. It is mostly similar to Turbo Pascal, but Borland has added some features to it. I will deal with these later. Object Pascal is obviously an object oriented language. For those who don’t know what this is I’ll give a brief summary in the next [...]

This was posted under category: Application Tags:

Get the harddisk serial number

Saturday, March 28, 2009 7:03 No Comments

function GetHardDiskSerial(const DriveLetter: Char): string;
var
NotUsed: DWORD;
VolumeFlags: DWORD;
VolumeInfo: array[0..MAX_PATH] of Char;
VolumeSerialNumber: DWORD;
begin
GetVolumeInformation(PChar(DriveLetter + ‘:\’),
nil, SizeOf(VolumeInfo), @VolumeSerialNumber, NotUsed,
VolumeFlags, nil, 0);
Result := Format(’Label = %s VolSer = %8.8X’,
[VolumeInfo, VolumeSerialNumber])
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(GetHardDiskSerial(’c’));
end;

This was posted under category: Application Tags: ,

Delphi for PHP 2.0

Saturday, March 28, 2009 6:54 No Comments

The only development solution for drag-and-drop visual design for PHP
Build data-driven Web applications with broad database connectivity
Create AJAX-enabled Web 2.0 pages and sites
Everything you need in a PHP development environment including a powerful code editor, debugger, profiler, database tools and much more
Use the VCL for PHP component library with more than 70 visual components to [...]

This was posted under category: Application Tags: ,