473,785 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

open website source into richtextbox

Mague
137 New Member
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 1956
Tiggie
3 New Member
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 Recognized Expert Expert
Go search Google. :)
Jul 6 '07 #3
Mague
137 New Member
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
3229
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 work in progress (current release version is 0.4.6), but you should get a very good idea of what it's about by visiting the site (which uses it, funnily enough), or downloading a copy of it and trying it out.
10
2754
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, together with PostgreSQL on a Unix platform or SQL Server on a Windows platform. I am a qualified accountant and have been developing accounting software, mostly customised, for over 20 years. I have now got myself into a position financially...
6
3895
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 Source=c:\trio.mdb;"); // failed on this line //MM_editQuery is an INSERT sql statement MM_DBConn.Execute(MM_editQuery); When I run this on a Windows 2000 Professional system, I got the following error:
11
2609
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 than google; for example; I want to spider Home Depot websites and sell it to Lowes. Does anyone want to help?
3
8990
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 ContextMenuStrip. So I use that code: private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
24
5083
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 same code, except a different name for the file. The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\Accident.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
2
1084
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 http://www.codeplex.com/luigicorrias Nuova release del mio sito Open Source L'applicazione Web che ho messo online a disposizione di tutti i programmatori sta godendo di un discreto successo ed ho pensato di
0
1780
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 enabling the EnableAutoDragDrop property... On the other hand, when dragged text comes from an external application (or another component in my app) I want to apply some extra formatting (put the dropped text in bold for example), or simply not allow...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.