Hola, he puesto un Richtextbox1 y he puesto el código:
Código:
Public Class Form1
Private Sub Command1_Click()
RichTextBox1.Text = FicheroCompleto("C:\TuFichero.html")
End Sub
Private Function FicheroCompleto(ByVal Fichero As String) As String
Dim Numero As Integer
Numero = FreeFile()
Open Fichero For Binary As #Numero
FicheroCompleto = String(LOF(Numero), " ")
Get #Numero, , FicheroCompleto
Close #Numero
End Function
End Class
Y me ha dado estos errores:
Código:
Error 1 'Open' is not declared. File I/O functionality is available in the 'Microsoft.VisualBasic' namespace. C:\Users\Javier\Desktop\WindowsApplication1\WindowsApplication1\Form1.vb 9 3 WindowsApplication1
Error 2 Method arguments must be enclosed in parentheses. C:\Users\Javier\Desktop\WindowsApplication1\WindowsApplication1\Form1.vb 9 8 WindowsApplication1
Error 3 Comma, ')', or a valid expression continuation expected. C:\Users\Javier\Desktop\WindowsApplication1\WindowsApplication1\Form1.vb 9 16 WindowsApplication1
Error 4 'String' is a class type and cannot be used as an expression. C:\Users\Javier\Desktop\WindowsApplication1\WindowsApplication1\Form1.vb 10 23 WindowsApplication1
Error 5 '.' expected. C:\Users\Javier\Desktop\WindowsApplication1\WindowsApplication1\Form1.vb 10 29 WindowsApplication1
Error 6 'Get' statements are no longer supported. File I/O functionality is available in the 'Microsoft.VisualBasic' namespace. C:\Users\Javier\Desktop\WindowsApplication1\WindowsApplication1\Form1.vb 11 5 WindowsApplication1
Error 7 Expression expected. C:\Users\Javier\Desktop\WindowsApplication1\WindowsApplication1\Form1.vb 12 9 WindowsApplication1
Error 8 Method arguments must be enclosed in parentheses. C:\Users\Javier\Desktop\WindowsApplication1\WindowsApplication1\Form1.vb 12 9 WindowsApplication1
¿Qué es lo que he puesto mal?
Gracias por la ayuda y saludos.