|
-
Feb 3rd, 2004, 12:23 PM
#1
Thread Starter
Hyperactive Member
Custom Web Control
I am developing a custom web control. At this time , i am coding the tags. I am trying to make the rich text box , understand all the html tags, until now i have done the following but i have problems with some:
<html></html>,
<font></font>,
<li></li>,
<br>,
<p></p>,
<left></left>,
<center></center>,
<right></right>,
<body></body>,
i know i have more to do but i am stack at to tags.
The first (hyperlink tag) :
<a href="http://www.mysite.com/">Test</a>
I don't know how to load the url and create an url link in Rich Text Box.
The secont (image tag):
<img src="image.gif">Test Image</img>
I don't know how to load the image url fro mthis tag and load the image into a Rich Text Box.
Here is the code for FONT tag:
Rich Text Box's Name = Page
Form's Name = Form1
Function FormatFont()
'Find the font tag
Dim tFont As Integer
tFont = InStr(tFont + 1, Form1.Page.Text, "<font ", vbTextCompare)
While tFont > 0
Dim eFont As Integer
eFont = InStr(tFont + 1, Form1.Page.Text, "</font>", vbTextCompare)
If (eFont > tFont) Then
'find whats between these
Dim hFindFont As String
Dim hFontSize As Variant
Dim hFontName As String
Dim etFont As Integer
etFont = InStr(tFont + 1, Form1.Page.Text, ">", vbBinaryCompare)
If ((etFont > tFont) And (etFont < eFont)) Then
'select what we want
Form1.Page.SelStart = tFont + 5
Form1.Page.SelLength = (etFont - 2) - (tFont + 5)
hFindFont = Form1.Page.SelText
hFontName = FindFontName(hFindFont)
hFontSize = FindFontSize(hFindFont)
Form1.Page.SelStart = etFont
Form1.Page.SelLength = (eFont - 1) - (etFont)
Form1.Page.SelFontName = hFontName
Form1.Page.SelFontSize = hFontSize
End If
End If
tFont = InStr(tFont + 1, Form1.Page.Text, "<font ")
Wend
End Function
Function FindFontName(line As String)
Dim name As Integer
Dim space As Integer
name = InStr(name + 1, line, "name=", vbTextCompare)
If (name > 0) Then
space = InStr(name + 1, line, "", vbTextCompare)
If (space > name) Then
Dim L1 As Integer
L1 = Len(Mid(line, name + 6))
FindFontName = Mid(line, name + 6, L1)
Else
FindFontName = Mid(line, name + 6, Len(line))
End If
End If
End Function
Function FindFontSize(line As String)
Dim size As Integer
Dim space As Integer
size = InStr(size + 1, line, "size=", vbTextCompare)
If (size > 0) Then
space = InStr(size + 1, line, " ", vbTextCompare)
If (space > size) Then
FindFontSize = Mid(line, size + 5, (space) - (size + 5))
Else
FindFontSize = Mid(line, size + 5, Len(line))
End If
End If
End Function
Please if you know something to help then send it.
This web control , would be published as open source and totally free when it would be finished.
Kostas Botonakis , Greece
-
Feb 3rd, 2004, 01:08 PM
#2
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:07 PM.
-
Feb 4th, 2004, 05:48 AM
#3
Thread Starter
Hyperactive Member
Thank you
Thank you raladin but i don't think that it would really help me this.
I finally did it with <img....> tag. I found a very simple way to load images in rich text box.
-
Feb 4th, 2004, 06:36 AM
#4
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:08 PM.
-
Feb 4th, 2004, 07:13 AM
#5
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:08 PM.
-
Feb 4th, 2004, 07:19 AM
#6
Thread Starter
Hyperactive Member
I didn't helped me
Ralladin i told you before, your code didn't help me at all. I knew the code before sending it to me.
I told you many times that your code is good but it didn't help me.
-
Feb 4th, 2004, 07:22 AM
#7
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:08 PM.
-
Feb 4th, 2004, 07:48 AM
#8
Thread Starter
Hyperactive Member
In MSN i told you that your code was expert but i meant expert in thinking, small and fast, but i wasn't what i needed.
That's what i said.Don't ever tell again that you helped me , you just gave me a code that i knew before.
-
Feb 4th, 2004, 08:13 AM
#9
Hyperactive Member
Last edited by raladin; Mar 29th, 2014 at 10:08 PM.
-
Feb 4th, 2004, 10:17 AM
#10
Thread Starter
Hyperactive Member
You are very wrong , i made the code before you , but that's not my point, my point is that you will see the project when it will finish and then tell me things like..........many FREE browsers!!! Ha ha , but you didn't think about one thing.
It is the first real Web Browser coded in VB6 and totally FREE and Open Source. That's the big point and not to sell the project to a big company (........) like the company you wrote to me at MSN.
You can see, the truth in programming new and big projects!
If there is no problem then why you are keep trying pushing me to say that you helped me with this project, while this is not the TRUTH. The truth is that you gave me an example and when i answered you and told you that it didn't helped me at all and that i knew it before , you told me that you gave me the idea and the way to do it.
Please stop doing things like that. Just try to do your job.
-
Feb 4th, 2004, 10:20 AM
#11
Frenzied Member
Originally posted by DarkX_Greece
You are very wrong , i made the code before you , but that's not my point, my point is that you will see the project when it will finish and then tell me things like..........many FREE browsers!!! Ha ha , but you didn't think about one thing.
It is the first real Web Browser coded in VB6 and totally FREE and Open Source. That's the big point and not to sell the project to a big company (........) like the company you wrote to me at MSN.
You can see, the truth in programming new and big projects!
If there is no problem then why you are keep trying pushing me to say that you helped me with this project, while this is not the TRUTH. The truth is that you gave me an example and when i answered you and told you that it didn't helped me at all and that i knew it before , you told me that you gave me the idea and the way to do it.
Please stop doing things like that. Just try to do your job.
Does this mean I don't have to help you anymore or? And - making a browser(as I told you before) is... stupid... Anyways, as long as you're wasting your own time...
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|