;

Binary File Compare

These simple and quick to implement methods will help you to compare files at a binary level. To demo this project, add three command button controls and simply replace the file path and name in the click events of the command button controls. Then you could modify the code to except file selections from the common dialgue control.

Code:
Dim a As String
Dim s As String

Private Sub Command1_Click()
    Open "" For Binary As #1
    a = Space(LOF(1))
    Get #1, , a
    Close #1
    MsgBox "Pic number 1 captured.", vbOKOnly + vbInformation, "Picture Compare"
End Sub

Private Sub Command2_Click()
    Open "" For Binary As #1
    s = Space(LOF(1))
    Get #1, , s
    Close #1
    MsgBox "File number 2 captured.", vbOKOnly + vbInformation, "Picture Compare"
End Sub

Private Sub Command3_Click()
    If s = a Then
        MsgBox "The file is the same."
    Else
        MsgBox "The file is not the same."
    End If
End Sub

Private Sub Form_Load()
    Command1.Caption = "Load File 1"
    Command2.Caption = "Load File 2"
    Command3.Caption = "Compare Files"
End Sub

No comments:

Post a Comment

Post Comments


Do you have any suggestions ? Add comment. Do not spam!

Search By Google

About this blog

Vision and Mission
Assist each company to improve efficiency and effectiveness to achieve the objectives to serve clients in a professional, objective and sustainable and provide the best solutions for businesses in solving problems in the procurement of informatics and technology.

Excellence
With support from experts and experienced professionals and geared towards fulfilling the needs of clients who put quality in a cost competitif. We also work as partners culter tailored to your company's corporate and can also provide an applicable and practical advice for clients.

New

 

WELCOME

Welcome to the Thomas IPT Blog - Thank you being here, and hope you come back often. Please surf here and read more about the world of computers and various articles of the world that I experienced. There are many things about, you'll probably find something interesting.

ABOUT ME

Working as a Management Information System Design And Development Operations Accounting. Specializing in the manufacture of Retail Database Desktop Applications, ERP / MRP, KSP / KSU, Warehouse, etc by using VB, SQL, Access, Crystal Report

NAVIGASI

SOCIAL STUFF

Info