Results 1 to 3 of 3
  1. #1
    trevor206's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    324
    Reputation
    12
    Thanks
    107

    [vid tut] how to make a webbrowser that can download.

    [YOUTUBE]<object width="560" height="340"><param name="movie" value="https://www.youtube.com/v/SqrmEqIDKQg&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://www.youtube.com/v/SqrmEqIDKQg&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>[/YOUTUBE]

    Link:
    Code:
    https://www.youtube.com/watch?v=SqrmEqIDKQg
    Add 7 buttons a webbrowser and a timer. enable the timer and set the interval to 50.


    Right under public class form1 put:
    Code:
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
    and under that:
    Code:
    Private Function Download(ByVal sFileRemote As String, ByVal sFileLocal As String, Optional ByRef errMessage As String = "") As Boolean Dim ret As Boolean = False Dim wc As New System.Net.WebClient() Try 'here is where download of file occurs wc.DownloadFile(sFileRemote, sFileLocal) ret = True Catch ex As Exception errMessage = ex.Message Return ret End Try Return ret End Function
    put this code on an invisible button:
    Code:
    Dim sErr, myPath As String 'setup some vars sErr = "" : myPath = My.Application.Info.DirectoryPath Dim droppedLink As String = "https://www.born63.com/index.html"
    If Not myPath.EndsWith("\") Then 'hey what if installed in root? myPath &= "\" End If
    
    Dim sLocalFile As String = myPath & "index.html"
    
    If Not Download(droppedLink, sLocalFile, sErr) Then If sErr <> "" Then 'just tailoring error without really checking the error object for types of error. just a general error message MsgBox("Unable to accomplish file download due to following error:" & vbCrLf & sErr & vbCrLf & "Please examine this error and see if you can correct the problem. Then try to download " & droppedLink & " again.", MsgBoxStyle.Critical) Else MsgBox("Unable to accomplish file download due to unknown error:" & vbCrLf & sErr, MsgBoxStyle.Critical) End If
    
    End If End If
    Timer 1
    Code:
    Dim starthotkey As Boolean starthotkey = GetAsyncKeyState(Keys.f1) If starthotkey = True Then
    home button
    Code:
    webbrowser1.gohome
    stop button
    Code:
    webbrowser1.stop
    refresh button
    Code:
    webbrowser1.refresh
    backward button
    Code:
    webbrowser1.goback
    forward button
    Code:
    webbrowser1.goforward
    go button
    Code:
    WebBrowser1.Navigate(TextBox1.Text)
    P.S
    if the video doesn't show up can someone tell me how to fix it or a mod fix it for me plz..
    Last edited by Pixie; 11-13-2009 at 06:04 PM.

  2. The Following User Says Thank You to trevor206 For This Useful Post:

    CounterAct (11-14-2009)

  3. #2
    Pixie's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Pixie wird wieder steigen.
    Posts
    1,884
    Reputation
    22
    Thanks
    229
    My Mood
    Fine
    Just try posting a link

    Or send me the link and I'll add it

  4. #3
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Quote Originally Posted by trevor206 View Post
    [YOUTUBE]<object width="560" height="340"><param name="movie" value="https://www.youtube.com/v/SqrmEqIDKQg&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://www.youtube.com/v/SqrmEqIDKQg&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>[/YOUTUBE]

    [YOUTUBE]https://www.youtube.com/watch?v=SqrmEqIDKQg[/YOUTUBE]

    Add 7 buttons a webbrowser and a timer. enable the timer and set the interval to 50.


    Right under public class form1 put:
    Code:
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
    and under that:
    Code:
    Private Function Download(ByVal sFileRemote As String, ByVal sFileLocal As String, Optional ByRef errMessage As String = "") As Boolean Dim ret As Boolean = False Dim wc As New System.Net.WebClient() Try 'here is where download of file occurs wc.DownloadFile(sFileRemote, sFileLocal) ret = True Catch ex As Exception errMessage = ex.Message Return ret End Try Return ret End Function
    put this code on an invisible button:
    Code:
    Dim sErr, myPath As String 'setup some vars sErr = "" : myPath = My.Application.Info.DirectoryPath Dim droppedLink As String = "https://www.born63.com/index.html"
    If Not myPath.EndsWith("\") Then 'hey what if installed in root? myPath &= "\" End If
    
    Dim sLocalFile As String = myPath & "index.html"
    
    If Not Download(droppedLink, sLocalFile, sErr) Then If sErr <> "" Then 'just tailoring error without really checking the error object for types of error. just a general error message MsgBox("Unable to accomplish file download due to following error:" & vbCrLf & sErr & vbCrLf & "Please examine this error and see if you can correct the problem. Then try to download " & droppedLink & " again.", MsgBoxStyle.Critical) Else MsgBox("Unable to accomplish file download due to unknown error:" & vbCrLf & sErr, MsgBoxStyle.Critical) End If
    
    End If End If
    Timer 1
    Code:
    Dim starthotkey As Boolean starthotkey = GetAsyncKeyState(Keys.f1) If starthotkey = True Then
    home button
    Code:
    webbrowser1.gohome
    stop button
    Code:
    webbrowser1.stop
    refresh button
    Code:
    webbrowser1.refresh
    backward button
    Code:
    webbrowser1.goback
    forward button
    Code:
    webbrowser1.goforward
    go button
    Code:
    WebBrowser1.Navigate(TextBox1.Text)
    P.S
    if the video doesn't show up can someone tell me how to fix it or a mod fix it for me plz..
    Very nice tutorial for the one´s that make webbrowser!
    -Rest in peace leechers-

    Your PM box is 100% full.

Similar Threads

  1. [TUT]How to make a webbrowser
    By frono15 in forum Programming Tutorials
    Replies: 5
    Last Post: 07-02-2008, 01:53 AM
  2. [Tut]How to Make KoWarrock Account Easy
    By EyalZamir in forum WarRock Korea Hacks
    Replies: 181
    Last Post: 06-08-2008, 12:05 PM
  3. [TuT] How to make PW and value box for Guns/Superjump/SkyStormer(VB6)
    By jokuvaan11 in forum WarRock - International Hacks
    Replies: 14
    Last Post: 06-30-2007, 01:09 PM
  4. [Request]Tut how to make his own bypass
    By BurakG in forum WarRock - International Hacks
    Replies: 3
    Last Post: 05-08-2007, 02:46 PM
  5. Tut: how to make cheese
    By ace76543 in forum General
    Replies: 14
    Last Post: 01-14-2007, 09:39 AM

Tags for this Thread