[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
stop button
refresh button
Code:
webbrowser1.refresh
backward button
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.
.