Test Foro de elhacker.net SMF 2.1

Programación => .NET (C#, VB.NET, ASP) => Programación General => Programación Visual Basic => Mensaje iniciado por: hunter18 en 27 Septiembre 2010, 04:34 AM

Título: Abrir archivo .htm en un webbrowser
Publicado por: hunter18 en 27 Septiembre 2010, 04:34 AM
Es posible hacerlo o no?, de esta forma no funciona.

WebBrowser1.Navigate = "d:\pagina.html"
Título: Re: Abrir archivo .htm en un webbrowser
Publicado por: Shell Root en 27 Septiembre 2010, 04:44 AM
Código (vb) [Seleccionar]
WebBrowser1.Navigate "C:\Documents and Settings\winxp\Mis documentos\PoC.html"
WebBrowser1.Navigate "res://" & App.Path & "/" & "PoC.html"
Título: Re: Abrir archivo .htm en un webbrowser
Publicado por: seba123neo en 27 Septiembre 2010, 04:44 AM
Hola, no va el "=" va asi....

Código (vb) [Seleccionar]
WebBrowser1.Navigate "C:\a.html"

saludos.
Título: Re: Abrir archivo .htm en un webbrowser
Publicado por: agus0 en 27 Septiembre 2010, 04:55 AM
Puede ser así...

Código (vb) [Seleccionar]

Private Sub Command1_Click()
    WebBrowser1.Navigate "C:/Users/Agustin/Desktop/asd.htm"
End Sub


o así...


Código (vb) [Seleccionar]

Private Sub Command1_Click()
    WebBrowser1.Navigate "file:///C:/Users/Agustin/Desktop/asd.htm"
End Sub


aveces si no agregas es "file:///" no anda. no se por que. Igual tu problema pasa por que usas mal la función. no se usa "=" Como ya lo dijo Seba.

Suerte!