Hi at all,
i want to create a editor for my resource....
it is possible with B4J?
I write a simple example to understand better in vb6
very simple editor:
Resource File (Stub)
This is possible in B4J???
thanks
i want to create a editor for my resource....
it is possible with B4J?
I write a simple example to understand better in vb6
very simple editor:
B4X:
Private Sub Command1_Click()
Dim myStub As String
Dim ResourceFile As String
Dim ResultFile As String
Dim message As String
message = "Hello Word!"
myStub = App.Path & "\stub.exe" 'my resource
ResourceFile = LoadFile(myStub) 'read my resource
ResultFile = App.Path & "\result.exe" 'final results
'write data into resource file
Call WriteFile(ResultFile, ResourceFile & "####" & message & "####")
MsgBox ("Done")
End Sub
Function LoadFile(PathToFile As String) As String 'simple Function to Read the Data of the File
Open PathToFile For Binary As #1
LoadFile = Space(LOF(1))
Get #1, , LoadFile
Close #1
End Function
Function WriteFile(PathToWFile As String, WriteData As String) As String 'simple Function to write the Data in a File
Open PathToWFile For Binary As #2
Put #2, , WriteData
Close #2
End Function
Resource File (Stub)
B4X:
Private Sub Form_Load()
Dim Datos As String
Dim sData() As String
Datos = LoadFile(App.Path & "\" & App.EXEName & ".exe")
sData = Split(Datos, "####") 'split data
MsgBox (sData(1))
Unload Me
End Sub
Function LoadFile(PathToFile As String) As String 'simple Function to Read the Data of the File
Open PathToFile For Binary As #1
LoadFile = Space(LOF(1))
Get #1, , LoadFile
Close #1
End Function
This is possible in B4J???
thanks