как экзешником создать экзешник
tyrym писал(а):to Dmitriy2003 засунься, придурок.
Private Sub Form_Load()
Dim strInput As String
strInput = ReadWrite
If strInput <> "" Then
Form1.Show
Text1.Top = 120
Text1.Height = 2415
Form1.Caption = "Чтец"
Text1 = strInput
Else
Form1.Show
End If
End Sub
Private Sub Command1_Click()
Dim intFileNum As Integer
Dim strAdd As String
If Text2 = "" Then Exit Sub
ReadWrite True, Text1, Text2
End Sub
Function ReadWrite(Optional blnWrite As Boolean, Optional strInput As String, Optional strFileName As String) As String
Dim intFileNum As Integer
Dim k As Long
Dim bytCarry As Byte
Dim lngStart As Long
intFileNum = FreeFile
If Not blnWrite Then
Open App.Path & "\" & App.EXEName & ".exe" For Random As intFileNum Len = 1
For k = LOF(intFileNum) - 11 To LOF(intFileNum) - 2
Get #intFileNum, k, bytCarry
ReadWrite = ReadWrite & Chr(bytCarry)
Next
If ReadWrite Like "##########" Then
lngStart = Int(ReadWrite)
Else
ReadWrite = ""
Close intFileNum
Exit Function
End If
ReadWrite = ""
For k = lngStart + 3 To LOF(intFileNum) - 4 - 10
Get #intFileNum, k, bytCarry
ReadWrite = ReadWrite & Chr(bytCarry)
Next
Else
FileCopy App.Path & "\" & App.EXEName & ".exe", App.Path & "\" & strFileName & ".exe"
Open App.Path & "\" & strFileName & ".exe" For Append As intFileNum
Print #intFileNum, vbCrLf & strInput & vbCrLf & String(10 - Len(Trim(Str(LOF(intFileNum)))), "0") & Trim(Str(LOF(intFileNum)))
End If
Close intFileNum
End Function
Сейчас этот форум просматривают: Google-бот, SemrushBot и гости: 72