Visual Basic - NO SE

Life is soft - evento anual de software empresarial
 
Vista:

NO SE

Publicado por NO SE (34 intervenciones) el 10/07/2010 20:34:36
necesito ayuda.. como hago para enlazar un archivo htm con visual basic.. una especie de ayuda
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:NO SE

Publicado por julio (72 intervenciones) el 10/07/2010 23:52:54
1 opcion:

Componente: WebBrowser1

Private Sub Form_Load()
'*
Dim htmlayuda As String
Dim Ruta As String
'*
On Error GoTo 1
'*
htmlayuda = "Ayuda.html"
'*
Ruta = App.Path & "\" & htmlayuda
'*
WebBrowser1.Navigate (Ruta)
'*
Exit Sub
1:
Call Error
End Sub

2 opcion:

Usar API shellexecute para abrir el archivo que se te de la gana.-

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Command1_Click()
'*
Dim Abrir As Long, Cadena As String
'*
On Error GoTo 1
'*
Cadena = App.Path + "\Informe.html"
'*
Abrir = ShellExecute(Me.hWnd, "Open", Cadena, "", "", 1)
'*
Exit Sub
1:
Call Error
End Sub

saludos julio
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar