source: trunk/Search.pas

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 
1unit Search;
2
3interface
4
5uses
6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7 Dialogs, StdCtrls, Shellapi;
8
9type
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
26var
27 Form8: TForm8;
28
29implementation
30
31{$R *.dfm}
32
33{ TForm8 }
34
35procedure TForm8.OpenSearchURL(URL: string);
36begin
37 ShellExecute(Handle, 'open', PChar(URL+Edit1.Text), nil, nil, SW_SHOWNORMAL);
38end;
39
40procedure TForm8.Button3Click(Sender: TObject);
41begin
42//http://wow.allakhazam.com/search.html?q=test
43 OpenSearchURL('http://wow.allakhazam.com/search.html?q=');
44end;
45
46procedure TForm8.Button2Click(Sender: TObject);
47begin
48//http://thottbot.com/?s=test
49 OpenSearchURL('http://thottbot.com/?s=');
50end;
51
52procedure TForm8.Button1Click(Sender: TObject);
53begin
54//http://www.wowhead.com/?search=test
55 OpenSearchURL('http://www.wowhead.com/?search=');
56end;
57
58end.
Note: See TracBrowser for help on using the repository browser.