Last change
on this file was 6, checked in by george, 16 years ago |
- Přesunuto: Hlavní vývojová větev přesunuta do podsložky trunk.
|
File size:
1.2 KB
|
Line | |
---|
1 | unit Search;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
---|
7 | Dialogs, StdCtrls, Shellapi;
|
---|
8 |
|
---|
9 | type
|
---|
10 | TForm8 = class(TForm)
|
---|
11 | Edit1: TEdit;
|
---|
12 | Button1: TButton;
|
---|
13 | Button2: TButton;
|
---|
14 | Label1: TLabel;
|
---|
15 | Button3: TButton;
|
---|
16 | procedure Button3Click(Sender: TObject);
|
---|
17 | procedure Button2Click(Sender: TObject);
|
---|
18 | procedure Button1Click(Sender: TObject);
|
---|
19 | private
|
---|
20 | { Private declarations }
|
---|
21 | public
|
---|
22 | { Public declarations }
|
---|
23 | procedure OpenSearchURL(URL: string);
|
---|
24 | end;
|
---|
25 |
|
---|
26 | var
|
---|
27 | Form8: TForm8;
|
---|
28 |
|
---|
29 | implementation
|
---|
30 |
|
---|
31 | {$R *.dfm}
|
---|
32 |
|
---|
33 | { TForm8 }
|
---|
34 |
|
---|
35 | procedure TForm8.OpenSearchURL(URL: string);
|
---|
36 | begin
|
---|
37 | ShellExecute(Handle, 'open', PChar(URL+Edit1.Text), nil, nil, SW_SHOWNORMAL);
|
---|
38 | end;
|
---|
39 |
|
---|
40 | procedure TForm8.Button3Click(Sender: TObject);
|
---|
41 | begin
|
---|
42 | //http://wow.allakhazam.com/search.html?q=test
|
---|
43 | OpenSearchURL('http://wow.allakhazam.com/search.html?q=');
|
---|
44 | end;
|
---|
45 |
|
---|
46 | procedure TForm8.Button2Click(Sender: TObject);
|
---|
47 | begin
|
---|
48 | //http://thottbot.com/?s=test
|
---|
49 | OpenSearchURL('http://thottbot.com/?s=');
|
---|
50 | end;
|
---|
51 |
|
---|
52 | procedure TForm8.Button1Click(Sender: TObject);
|
---|
53 | begin
|
---|
54 | //http://www.wowhead.com/?search=test
|
---|
55 | OpenSearchURL('http://www.wowhead.com/?search=');
|
---|
56 | end;
|
---|
57 |
|
---|
58 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.