Results 1 to 11 of 11

Thread: Custom Web Control

  1. #1

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Exclamation 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
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  2. #2
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:07 PM.

  3. #3

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Exclamation 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.
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  4. #4
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:08 PM.

  5. #5
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:08 PM.

  6. #6

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Exclamation 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.
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  7. #7
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:08 PM.

  8. #8

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Thumbs down

    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.
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  9. #9
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:08 PM.

  10. #10

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Thumbs down

    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.
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  11. #11
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    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
  •  



Click Here to Expand Forum to Full Width