Results 1 to 9 of 9

Thread: Inet Control Help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    92

    Inet Control Help

    VB Code:
    1. Private Sub Command2_Click()
    2.  
    3. n = -14
    4.  
    5.  
    6.  
    7. For n = n To Text2.Text
    8. n = n + 14
    9. myurl = Text3.Text & n
    10.  
    11. Inet1.Protocol = icHTTP
    12. Inet1.Execute CStr(myurl), "GET /"
    13. While Inet1.StillExecuting
    14.     DoEvents
    15.    Wend
    16.  Text1.Text = Replace(Text1.Text, vbCrLf + vbCrLf, vbCrLf)
    17. 'Call Limits
    18. Call parse
    19. Call Command3
    20.  
    21. Text1.Text = ""
    22.  
    23.  Next n
    24.  
    25. MsgBox "Done"
    26. End Sub
    27.  
    28.  
    29.  
    30. Private Sub Inet1_StateChanged(ByVal State As Integer)
    31. Select Case State
    32. Case 12
    33. stemp = Inet1.GetChunk(100)
    34. While stemp <> ""
    35. Text1.Text = Text1.Text & stemp
    36. 'Text1.Text = Replace(Text1.Text, " ", "")
    37. stemp = Inet1.GetChunk(100)
    38. Wend
    39. Text1.Text = Text1.Text & stemp
    40. Case 11
    41. MsgBox Inet1.ResponseInfo, vbCritical, "error"
    42. End Select
    43. End Sub



    I need to pull html from a website and place it in a rich text box. This code worked once before , but I have changed computers and many updates. I am not sure if the code has gotten changed or modified but it doesn't work now. Any ideas or help is appreciated.

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Inet Control Help

    First you would need a rich text box.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    92

    Re: Inet Control Help

    text1 is a rich text box.

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Inet Control Help

    Is it pulling down any data? What is the problem?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    92

    Re: Inet Control Help

    its not pulling any data , it seems to be connecting to the internet and working but no data is being displayed in rich text box nor does it show any in the watch screen.

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Inet Control Help

    Put a breakpoint on the Select Case to see what value State has.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    92

    Re: Inet Control Help

    It goes from break point Select Case State to Case 12 then skips to Case 11 then goes to End Select.

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Inet Control Help

    Hover over STATE to see what the value is, or place a

    MSGBOX STATE in somewhere. Did you always use the variable STATE? Could it be reserved?

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    92

    Re: Inet Control Help

    State return = 5

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