Home > Back-end >  Delphi7 have problems in making a web information acquisition system
Delphi7 have problems in making a web information acquisition system

Time:10-03

I made a web page delphi7 information acquisition system, the interface is as follows:

The code is as follows:
The unit Unit1;

Interface

USES the
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

Type
TForm1=class (TForm)
Memo1: TMemo;
Edit1: TEdit;
For: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Procedure Button1Click (Sender: TObject);
Procedure Button2Click (Sender: TObject);
Procedure Button3Click (Sender: TObject);
Procedure Button4Click (Sender: TObject);
Private
{Private declarations}
Procedure into (I: Word);
Public
{Public declarations}
end;

Var
Form1: TForm1;

Implementation
USES UI_Less;

{$R *. DFM}

Procedure TForm1. Into (I: Word);
Var
Sh: TUILess;
Su: Boolean;
Surl: PWideChar;
The begin
Surl:=PWideChar (Trim (Edit1. Text));
Sh:=TUILess. Create (nil);
Try
Memo1. The Clear;
In case of I
1:
Sh. GetAnchorList (sh) Get (surl, su, False), Memo1. Lines);
2:
Sh. GetImageList (sh) Get (surl, su, False), Memo1. Lines);
3:
The begin
Sh. Get (surl, su, False);
Memo1. Lines:=sh. BodyHtml;
end;
end;

The finally
Sh. Free;

end;
end;






Procedure TForm1. Button1Click (Sender: TObject);
The begin
Into (1);
end;

Procedure TForm1. Button2Click (Sender: TObject);
The begin
Into (2);
end;

Procedure TForm1. Button3Click (Sender: TObject);
The begin
Into (3);
end;

Procedure TForm1. Button4Click (Sender: TObject);
The begin
Into (4);
end;

End.
But click on any one button, can appear the following tips:

You give me directions, more urgent, the younger brother in this thank you!

CodePudding user response:

00000000 visited this fault is there is no object, check the sh. If BodyHtml is nil

CodePudding user response:

Debugging, positioning to the wrong code
  • Related