473,378 Members | 1,507 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

open website source into richtextbox

Mague
137 100+
Hey,

I need to open a website source code into a richtextbox. Is this possible? If it is please leave code

Also i have an unanswered question.

I wanted to know if in the richtextbox i could change the colour of text. I know you can do this with a selectedtext command but everytime i type into a richtextbox it higlights everything i want another colour. Is there a way i can change the font colour without making it highligting the things already the other colour. Also i want everything a diff colour.

If you can answer or suggest any help for this i would apressiate it alot. Thank lots for you help. Also dont tell me to search google please, i have spent ages searching and i got some tech homework due when i go back to school (year 8) so i dont really have time to search the whole internet.

Thanks lots
Mague

ps. no1 has told me to search google on this site yet. Mostly on other sites
Jul 5 '07 #1
3 1929
Tiggie
3
hey there! well, to retreive an URL's html page, just right click your toolbox, go to Components... Activate Microsoft Internet Transfer Controls 6.0 and press Accept.

You'll see a new icon on the toolbox (called Inet). Click on it and draw one on the Form. It's invisible, just as Timers.

So, on code, basically write this: (VB 6)

Expand|Select|Wrap|Line Numbers
  1. Dim sHtml As String
  2. sHtml = Inet1.OpenURL ("http://www.mywebpage.com/")
  3. 'It can also be:
  4. 'sHtml = Inet1.OpenURL ("http://www.mywebpage.com/mypage.html")
  5. 'And so on...
Now, there's a better way to highlight things on a RTB... aww if i try using it says I'm not licensed :S omg since when? Anyways, create an RTB and a Textbox (with Multiline = True). Then create a button that on click event does following:

Expand|Select|Wrap|Line Numbers
  1. Text1.Text = RichTextBox1.TextRTF
(I can't check that right now but i think it's called TextRTF)

Also make another buttons to make current selection Bold (SelBold), Coloured (SelColor), etc... You know what I mean =P

Then start the application, write something on the RTB, colour some words, bold others, italic others, etc... When u have some nasty mix of Rich Text features (xD) written on your RTB, then press that button we created. Text1 will get the TextRTF which does not only contain the text, but the text in RTF code (such as if u see the code of an HTML page :P). Look what you got, look how it's made, once you know how each property is set up, just edit the TextRTF when highlighting something, and that's all (it's a lil bit more avanced than just SelBold = True, but it's the right way ;))

About Inet, i just find it fast and easy to use, I know there's always a better way to do everything, but using Inet is certainly not the worse =P enjoy =)
Jul 5 '07 #2
Killer42
8,435 Expert 8TB
Go search Google. :)
Jul 6 '07 #3
Mague
137 100+
thanks but i have vb.net but i figured out how to transfer that code. With the changing text colour i need it alitle different because im making a html editor which will update the text colour automaticly
Jul 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: jonathan.beckett | last post by:
Hi All, For the past few months I have been working on an open source Apache/PHP/MySQL content management system - and have recently made it available for download. It's still very much a...
10
by: Frank Millman | last post by:
Hi all I would like some advice, and I hope that the good people on c.l.p will give me the benefit of their experience. I am busy developing an accounting package, using Python and wxPython,...
6
by: xg | last post by:
Hi, I am writing an ASP page which contains the following code: var MM_DBConn=Server.CreateObject("ADODB.Connection"); MM_DBConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data...
11
by: susiedba | last post by:
does anyone know of a framework; or tools; or something-- that describes an open source VB.net search engine / spider? anyone want to trade notes? I want to build something a lot more focused...
3
by: ommail | last post by:
I have two RichTextBox controls on a form, and single ContextMenuStrip control which serves for both textboxes. I need to determine which RichTextBox control invokes an event handler in...
24
by: dancer | last post by:
Using ASP.net 1.1 and Microsoft Access. I received the following error message. Why? I have closed the Access file. I have another very small access file that opens with no trouble with the...
2
by: luigi.corrias | last post by:
New release my Open Source website ready to be downloaded My Web Application like at not so few people so i release a new version with new exiting functionality Please download and improve it...
0
by: Itanium | last post by:
Hi all! I'm getting in some trouble with Drag and Drop operations. I have a RichTextBox inside a Form. I want to allow text moving inside the RichTextBox itself, which is achieved by simply...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.