Results 1 to 15 of 15

Thread: I cant store all of my info in a text box, what else

  1. #1
    Guest

    Post

    I am trying to get the html source code of a webpage and put it in a text box. The problem is the text box doesn't hold it all. It gets cut off. Anyone know how to either get all of the info into a spot where i can search through it all or how to take chunks of the source code off of the webpage?

  2. #2
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Calgary Alberta
    Posts
    359

    Post

    As far I remember, a normal text box only holds 255 chars, this is probably the problem you're having.

  3. #3
    Guest

    Post

    then how can i get around this problem?
    I am using:
    Text1.Text=Inet1.OpenURL("mywebsite.com")
    to get the source code is there a way to either write the code to a file directly so i get it all or is there a way extract it by parts from the web page source code?

  4. #4
    Guest

    Post

    actually a textbox holds i believe up to 65k but with html source this can be exceeded quickly. make sure you set the multiline property equal to true(then set the scrollbars so you can scroll, I would used the Rich Text Box though as it holds WAY more than the textbox control and it's default is multiline = true.

  5. #5
    Guest

    Post

    actually i think when i used a rtb it held less. i think.

  6. #6
    Guest

    Post

    i need it to hold about 37 kb worth of source code, and i retract my last statement about the rtb

  7. #7
    Lively Member
    Join Date
    Oct 1999
    Posts
    101

    Post

    Hi dmartin17,

    I found this in MSDN Help in VB. I haven't tried it, but it should work. It writes the source code to a text file:
    Code:
    Dim strURL As String      ' URL string
    Dim intFile As Integer   ' FreeFile variable
    IntFile = FreeFile()
    strURL = "http://www.microsoft.com"
    Open "c:\temp\MSsource.txt" For Output _
    As #IntFile
    Write #IntFile, Inet1.OpenURL(strURL)
    Close #IntFile
    HTH.

    Chris

    [This message has been edited by ChrisJackson (edited 01-14-2000).]

  8. #8
    Guest

    Post

    ok ive tried writing directly to a file ive also tried using a rich text box and a regular text box. the bottem line is that it never gets the entire amount of source code, it always stops before finishing.

    any other suggestions on was to get the source code? I need to search through it for specific words and numbers? please let me know

  9. #9
    Guest

    Post

    ok ive tried writing directly to a file ive also tried using a rich text box and a regular text box. the bottem line is that it never gets the entire amount of source code, it always stops before finishing.

    any other suggestions on was to get the source code? I need to search through it for specific words and numbers? please let me know

  10. #10
    Addicted Member
    Join Date
    Jul 1999
    Posts
    219

    Post

    i got a ideal make it where it saves to it own file like something.web cuase usaly that might make it be bigger try it and see

  11. #11
    Guest

    Post

    hi,

    i had the same problem. i think u use the MSINET ocx, right ?

  12. #12
    Guest

    Post

    Ive tried all of these thigns but for some reason i can not get all of the text. Thanks for the help. i still just cant get it to work.

  13. #13
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    from MSDN:
    the RichTextBox control doesn't have the same 64K character capacity limit of the conventional TextBox control.

  14. #14
    Guest

    Post

    I still have had no success with this anymore ideas?

  15. #15
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Post

    Hi.

    I'm no expert on this, but you did say ANY more ideas, so here's one. I have absolutely no idea if it's a good one though.

    Maybe you could output the HTML to the clipboard? I don't think I've ever had text cut off from pasting, but then I probably never exceeded the 65k mark I dunno, but you might want to try it.

    For the purposes of identifying the reason for the cut-off: how much text can you carry over? Is it always the same? Maybe the problem is not the way you're outputting the text, maybe it's the way you're retrieving it in the first place.

    I have no experience in this area, so I don't really know enough to make any suggestions.

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