INTERACT FORUM

Windows => Plug-in Development => Topic started by: KingSparta on July 06, 2003, 05:59:07 am

Title: Download HTML Sample (VB6)
Post by: KingSparta on July 06, 2003, 05:59:07 am
Just Submiting Some Sample Code

To Download An HTML File

Private Sub DownloadHtml()
   ' MYURL = What Else My URL '
   If MYURL <> "" Then
       ' My Standard DownLoad HTML Code Sub     '
       ' Just in Case There Is An Error Trap It '
       On Error GoTo MyError
       ' Clear The RTB '
       RichTextBox1.Text = ""
       ' Clear The RTB Filename '
       RichTextBox1.FileName = ""
       ' Set the DownLoad Up '
       Dim MJIA As MediaJukebox.MJInternetAutomation
       Set MJIA = g_MJ.GetInternet
       MJIA.DownloadMode = DOWNLOAD_MODE_NO_UI
       ' Going Fishing, Do The Download '
       TempFile = MJIA.DownloadToTempFile(MYURL)
       ' Did We Get Anything? '
       If TempFile <> "" Then
           ' Cought Something, Put It In The Bucket '
           RichTextBox1.FileName = TempFile
           ' Remove Temp File So There Is Not A Crap '
           ' Load Of Temp Files In The Temp Folder   '
           Kill (TempFile)
       End If
   End If
MyError:
End Sub


'And The Beat Goes On' Charted At 19 In 1980

Listening to: 'And The Beat Goes On' from 'Super Hits Of 80' by 'Whispers' on Media Center 9.1