Tutorial by Examples

This program, saved to a file named HelloWorld.dpr, compiles to a console application that prints "Hello World" to the console: program HelloWorld; {$APPTYPE CONSOLE} begin WriteLn('Hello World'); end.
This progam uses VCL, the default UI components library of Delphi, to print "Hello World" into a message box. The VCL wrapps most of the commonly used WinAPI components. This way, they can be used much easier, e.g. without the need to work with Window Handles. To include a dependency (lik...
This program uses the Windows API (WinAPI) to print "Hello World" into a message box. To include a dependency (like Windows in this case), add the uses block including a comma-separated list of units ending with an semicolon. program HelloWorld; uses Windows; begin MessageBox...
XE2 program CrossPlatformHelloWorld; uses FMX.Dialogs; {$R *.res} begin ShowMessage('Hello world!'); end. Most of the Delphi supported platforms (Win32/Win64/OSX32/Android32/iOS32/iOS64) also support a console so the WriteLn example fits them well. For the platforms that require...

Page 1 of 1