Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

HTML-code from site in memo

Posted on 2003-02-28
10
Medium Priority
?
147 Views
Last Modified: 2010-04-04
How can i get a HTML-code from a site in a memo?
0
Comment
Question by:misterstefano
  • 5
  • 5
10 Comments
 
LVL 5

Accepted Solution

by:
Lukasz Lach earned 80 total points
ID: 8044871
0
 

Author Comment

by:misterstefano
ID: 8047553
It's not the same, i want the html code in a Tmemo
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 8047571
it IS the same:

Memo1.Text := GetPage('http://www.google.com');
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:misterstefano
ID: 8047588
HINTERNET,InternetOpen,INTERNET_OPEN_TYPE_PRECONFIG,... is undeclared! (I Use Delphi7)
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 8047595
uses WinInet;
0
 

Author Comment

by:misterstefano
ID: 8047629
Yes I found it also ;) But it's not exactly the same:

Original:
text1
text2
text3

In Memo:
text1|text2|text3     (| is in bold)

The lines-count is important in my program.
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 8047659
god... because in memo new lines are displayed, displayed as webpage in webbrowser are ignored, so you don't see them, whatever, the length is THE SAME but if you want you can:

s := StringReplace(s, #13, '', [rfReplaceAll]);
s := StringReplace(s, #10, '', [rfReplaceAll]);

so that you won't have them... can be done also with a loop if you prefer...
0
 

Author Comment

by:misterstefano
ID: 8047761
you replave the | to ''

text1|text2 ---> text1text2

but how do you replace a | to a next line

Text1|text2 --->  Text1    (line1)
                  Text2    (line2)
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 8047776
you have to change #13 or #10 to #13#10. I don't know which one is sent by a HTTPd, just check...

s := StringReplace(s, #13, #13#10, [rfReplaceAll]);
// or
s := StringReplace(s, #10, #13#10, [rfReplaceAll]);
0
 

Author Comment

by:misterstefano
ID: 8047788
Thanks ;)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month11 days, 7 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question