|
-
Jul 1st, 2008, 08:45 PM
#1
Thread Starter
Member
[RESOLVED] Whats the best way to display website info?
Wondering, what's the best way to display text from a website to your form?
-
Jul 1st, 2008, 09:49 PM
#2
Re: Whats the best way to display website info?
-
Jul 2nd, 2008, 06:54 AM
#3
Thread Starter
Member
Re: Whats the best way to display website info?
Aside from using a webbrowser control.
Like if I just want to display some text from a website to a label on my form.
-
Jul 2nd, 2008, 08:13 AM
#4
Re: Whats the best way to display website info?
You can use Inet for that.
Add a Command button, a label and the Inet control (Microsoft Internet Transfer Control in the components list) to your form
The code below gets the text from your starting post and shows it in a label.
Code:
Private Sub Command1_Click()
Dim strText As String
Dim x As Long, y As Long
strText = Inet1.OpenURL("http://www.vbforums.com/showthread.php?t=529677")
y = InStr(1, strText, "<!-- message -->")
If y Then
x = InStr(y + 20, strText, ">")
If x Then
y = InStr(x, strText, "</div>")
If y Then
Label1.Caption = Mid$(strText, x + 1, (y - x) - 1)
End If
End If
End If
End Sub
-
Jul 2nd, 2008, 09:55 AM
#5
Thread Starter
Member
Re: Whats the best way to display website info?
Thanks a bunch.
-
Jul 4th, 2008, 12:40 AM
#6
Addicted Member
Re: [RESOLVED] Whats the best way to display website info?
Can you please check why the same process is not working for me at http://www.vbforums.com/showthread.php?t=529914
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
|