Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú[RUTA DEL VB] & " /make " & Chr(34) & [SOUCE FILE] & Chr$(34) & " " & Chr$(34) & [DEST FILE] & Chr$(34)
Option Explicit
Private Sub Form_Load()
Dim sText As String
sText = "a" & vbCrLf & "b" '// Esto seria el contenido del archivo
Dim vItem As Variant
For Each vItem In Split(sText, vbCrLf)
List1.AddItem vItem
Next
End Sub
Private Sub UserControl_InitProperties()
UserControl.Extender.Align = vbAlignTop
End Sub
Option Explicit
Private Sub Form_Load()
Dim pbg As New PropertyBag
SaveFile App.Path & "\text1.txt", StrConv("Test File 1", vbFromUnicode)
SaveFile App.Path & "\text2.txt", StrConv("Test File 2", vbFromUnicode)
pbg.WriteProperty "File1", GetFile(App.Path & "\text1.txt")
pbg.WriteProperty "File2", GetFile(App.Path & "\text2.txt")
Kill App.Path & "\text1.txt"
Kill App.Path & "\text2.txt"
SaveFile App.Path & "\Pack.dat", pbg.Contents
Set pbg = Nothing
Set pbg = New PropertyBag
pbg.Contents = GetFile(App.Path & "\Pack.dat")
SaveFile App.Path & "\text1.txt", pbg.ReadProperty("File1")
SaveFile App.Path & "\text2.txt", pbg.ReadProperty("File2")
Kill App.Path & "\Pack.dat"
End Sub
Private Function GetFile(sFile As String) As Byte()
Dim iFile As Long
iFile = FreeFile
Open sFile For Binary Access Read As iFile
ReDim GetFile(LOF(iFile) - 1)
Get iFile, , GetFile
Close iFile
End Function
Private Sub SaveFile(sFile As String, bvData() As Byte)
Dim iFile As Long
iFile = FreeFile
Open sFile For Binary Access Write As iFile
Put iFile, , bvData
Close iFile
End Sub