Visual Basic - Archivos .pas sobre VB

Life is soft - evento anual de software empresarial
 
Vista:

Archivos .pas sobre VB

Publicado por Daniel Monterrey (1 intervención) el 07/11/2003 04:17:10
Necesito saber como es posible leer un archivo .pas de Pascal y cargarlo a una Caja de Texto Multiline ¿Alguien sabe cómo hacerlo?.......
.......Urgente
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:Archivos .pas sobre VB

Publicado por Cecilia Colalongo (3116 intervenciones) el 07/11/2003 05:20:18
Fijate con esto:

Text1.Text=FileToString("c:\demo.pas")

Public Function FileToString(FileName As String) As String
Dim hlngFile As Long, strFile As String
hlngFile = FreeFile
Open FileName For Binary Access Read As hlngFile
FileToString = vbNullString
strFile = String(FileLen(FileName), " ")
Get hlngFile, , strFile
Close hlngFile
FileToString = strFile
End Function

Y para el proceso inverso (si te sirve)

StringToFile Text1.Text,"c:\demo.pas"

Public Function StringToFile(StringText As String, FileName As String) As Long
Dim hlngFile As Long
hlngFile = FreeFile
Open FileName For Binary Access Write As hlngFile
Put hlngFile, , StringText
Close hlngFile
StringToFile = FileLen(FileName)
End Function
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