[fpc-pascal] Windows programming tutorials for FPC

Bo Berglund bo.berglund at gmail.com
Sat Nov 3 00:00:53 CET 2018

On Fri, 2 Nov 2018 06:13:40 -0400, "James"
<james at productionautomation.net> wrote:

>I am wondering if there are any tutorials out there, hopefully specific to Freepascal and/or Lazarus. 
>I need really basic stuff like how to open a message box, or how to use windows file open, or save-as 
>dialog boxes.. etc.. even a hello world tutorial would be helpful... 
>ok, so ZERO windows programming experience here...   Any advice on where to start?

What did the programs you say you have written for so long do?
Seems hard to believe you have not encountered reading and writing
files etc.

Programming for Windows is basically no different than programming for
say Linux or any other operating system, the same code applies but the
compiler will translate to the proper syntax to call the operating
system without you having to bother....

In order to do graphic programming you should look at FPC sidekick
Lazarus, which handles Rapid Application Development by letting you
design your forms interactively. And it does not limit the target to
Windows, same code can be used for Linux and other operating systems.


Message box:
ShowMessage('Message text to show');

File handling:
 F: file;
FileName: string;
 FileName := <filename on disk>;
 AssignFile(F, Filename);
 Writeln(F, 'text to write');

etc, etc, etc

Bo Berglund
Developer in Sweden

More information about the fpc-pascal mailing list