?
Solved

HTML-code from site in memo

Posted on 2003-02-28
10
Medium Priority
?
146 Views
Last Modified: 2010-04-04
How can i get a HTML-code from a site in a memo?
0
Comment
Question by:misterstefano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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!

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month11 days, 8 hours left to enroll

752 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