On 24.04.2012 18:25, Jürgen Hestermann wrote:
I wanted to write a program that has no window but may show messages to
the user.
I have lots of such programs written with Virtual Pascal but I am
struggling
to do the same with Free Pascal/Lazarus.
A simple test program would look like this:
-
As leledumbo has pointed out, you need to call Application.Initialize()
before using LCL features. The code for TApplication.Initialize() shows
that it initializes the currently active widget set, which is maintained
by the Interfaces unit. ShowMessage() relies ultimately upon
TWidgetSet.PromptUs
Howard Page-Clark schrieb:
> A GUI program requires a "main window" since that is the avenue for
user interaction.
> You can hide that window (not "ignore" it) as in the following
program, which compiles
> and runs. However, I can't myself see the use of such truncated GUI
functionality.
> Once
JC Chu schrieb:
> Try this.
> program Test;
> {$MODE DELPHI}
> {$APPTYPE GUI}
> uses
> {$IF Defined(UNIX) and Defined(UseCThreads)}cthreads,{$ENDIF}
> Interfaces, Forms, Dialogs;
>
> begin
> Application.Initialize;
> ShowMessage('Test');
> end.
Yes, this works
Sven Barth schrieb:
>> When I create a new project and select to create an "Application",
>> copy the above into the main program (ignoring Unit1.pas) and run
>> the program I get an exception "Fensterklasse nicht gefunden" (in
>> german, although I setup Lazarus in english!)
>
> This specific exc
Am 24.04.2012 18:25, schrieb Jürgen Hestermann:
I wanted to write a program that has no window but may show messages to
the user.
I have lots of such programs written with Virtual Pascal but I am
struggling
to do the same with Free Pascal/Lazarus.
A simple test program would look like this:
---
On 24/4/12 5:25, Jürgen Hestermann wrote:
I wanted to write a program that has no window but may show messages to
the user.
I have lots of such programs written with Virtual Pascal but I am
struggling
to do the same with Free Pascal/Lazarus.
A simple test program would look like this:
-
I wanted to write a program that has no window but may show messages to
the user.
I have lots of such programs written with Virtual Pascal but I am
struggling
to do the same with Free Pascal/Lazarus.
A simple test program would look like this:
program Test;
{$m