-
Notifications
You must be signed in to change notification settings - Fork 0
/
project1.lpr
36 lines (31 loc) · 902 Bytes
/
project1.lpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, Unit1, Unit2, Windows
{$IFDEF LCLWinCE}
, WinCEInt, comobj
{$ENDIF}
{ you can add units after this };
{$R *.res}
var existingWindow: windows.HWND;
begin
RequireDerivedFormResource:=True;
{$IFDEF LCLWinCE}
WinCEWidgetset.WinCETitlePolicy:=tpOKButtonOnlyOnDialogs;
{$ENDIF}
existingWindow:=windows.FindWindowW(nil,PWideChar('Noter Client'));
If existingWindow<>0 then
begin
windows.SendMessageW(existingWindow,windows.WM_USER,1,0);
Exit;
end;
Application.Title:='Noter Client';
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.Run;
end.