12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Build<strong>in</strong>g Internet Applications<br />

20: }<br />

21: //----------------------------------------------------------------<br />

22: void __fastcall TfmBrowser::htBrowserBeg<strong>in</strong>Retrieval(TObject *Sender)<br />

23: {<br />

24: Cursor=(TCursor)crHourGlass;<br />

25: if (cbURL->Items->IndexOf(htBrowser->URL)==-1) {<br />

26: cbURL->Items->Add(htBrowser->URL);<br />

27: cbURL->Text=htBrowser->URL;<br />

28: cbURL->SelectAll();<br />

29: tcURL->Tabs->Add(htBrowser->URL);<br />

30: tcURL->TabIndex=tcURL->Tabs->Count-1;<br />

31: bbGo->Click();<br />

32: }<br />

33: }<br />

34: //----------------------------------------------------------------<br />

35: void __fastcall TfmBrowser::tcURLChange(TObject *Sender)<br />

36: {<br />

37: cbURL->Text=tcURL->Tabs->Str<strong>in</strong>gs[tcURL->TabIndex];<br />

38: cbURL->SelectAll();<br />

39: bbGo->Click();<br />

40: }<br />

41: //----------------------------------------------------------------<br />

42: void __fastcall TfmBrowser::bbHomeClick(TObject *Sender)<br />

43: {<br />

44: htBrowser->RequestDoc(HomePage);<br />

45: }<br />

46: //----------------------------------------------------------------<br />

47: void __fastcall TfmBrowser::htBrowserEndRetrieval(TObject *Sender)<br />

48: {<br />

49: Cursor=(TCursor)crDefault;<br />

50: }<br />

51: //----------------------------------------------------------------<br />

List<strong>in</strong>g 13.3. The text version of your Web browser’s ma<strong>in</strong> form,<br />

Surf00, as text.<br />

1: object fmBrowser: TfmBrowser<br />

2: Left = 249<br />

3: Top = 183<br />

4: Width = 500<br />

5: Height = 337<br />

6: Caption = ‘Surf’<br />

7: Font.Color = clW<strong>in</strong>dowText<br />

8: Font.Height = -13<br />

9: Font.Name = ‘MS Sans Serif’<br />

10: Font.Style = []<br />

11: Position = poScreenCenter<br />

12: PixelsPerInch = 120<br />

13: TextHeight = 16<br />

<strong>14</strong>: object tcURL: TTabControl<br />

15: Left = 0<br />

481<br />

cont<strong>in</strong>ues<br />

13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!