-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabout.pas
More file actions
78 lines (62 loc) · 1.49 KB
/
Copy pathabout.pas
File metadata and controls
78 lines (62 loc) · 1.49 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
unit About;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ComCtrls, ExtCtrls, LCLProc, LazHelpHTML, UTF8Process;
type
{ TAboutForm }
TAboutForm = class(TForm)
Image1: TImage;
Image2: TImage;
Image4: TImage;
Memo1: TMemo;
Memo2: TMemo;
Memo3: TMemo;
PageControl1: TPageControl;
StaticText1: TStaticText;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
TabSheet3: TTabSheet;
TabSheet4: TTabSheet;
procedure Label2Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
AboutForm: TAboutForm;
implementation
{ TAboutForm }
procedure TAboutForm.Label2Click(Sender: TObject);
var
v: THTMLBrowserHelpViewer;
BrowserPath, BrowserParams: string;
p: LongInt;
URL: String;
BrowserProcess: TProcessUTF8;
begin
v:=THTMLBrowserHelpViewer.Create(nil);
try
v.FindDefaultBrowser(BrowserPath,BrowserParams);
debugln(['Path=',BrowserPath,' Params=',BrowserParams]);
URL:='http://www.cticmg.com.br';
p:=System.Pos('%s', BrowserParams);
System.Delete(BrowserParams,p,2);
System.Insert(URL,BrowserParams,p);
// start browser
BrowserProcess:=TProcessUTF8.Create(nil);
try
BrowserProcess.CommandLine:=BrowserPath+' '+BrowserParams;
BrowserProcess.Execute;
finally
BrowserProcess.Free;
end;
finally
v.Free;
end;
end;
initialization
{$I about.lrs}
end.