OK, I have a program that successfully encrypts files using the des encryption, but when I try to encrypt rather large files, I cannot. I believe this is because all the data is loaded into the memory, which, when loading a large file, makes sense that I have a problem.

Code:
        ' Create input and output file streams.

        If in_file.Length = 0 Then Call Errors(0) : Exit Sub
        If out_file.Length = 0 Then Call Errors(1) : Exit Sub

        Dim in_stream As New FileStream(in_file, FileMode.Open, FileAccess.Read)
        Dim out_stream As New FileStream(out_file, FileMode.Create, FileAccess.Write)

        ' Make a triple DES service provider.
        Dim des_provider As New TripleDESCryptoServiceProvider

        ' Find a valid key size for this provider.
        Dim key_size_bits As Integer = 0
        For i As Integer = 1024 To 1 Step -1
            If des_provider.ValidKeySize(i) Then
                key_size_bits = i
                Exit For
            End If
        Next i

        Debug.Assert(key_size_bits > 0)

        ' Get the block size for this provider.
        Dim block_size_bits As Integer = des_provider.BlockSize

        frmProgress.ProgressBar1.Step = block_size_bits

        ' Generate the key and initialization vector.
        Dim key As Byte() = Nothing
        Dim iv As Byte() = Nothing

        MakeKeyAndIV(password, key_size_bits, block_size_bits, key, iv)

        ' Make the encryptor or decryptor.
        Dim crypto_transform As ICryptoTransform
        If encrypt Then
            crypto_transform = des_provider.CreateEncryptor(key, iv)
        Else
            crypto_transform = des_provider.CreateDecryptor(key, iv)
        End If

        ' Attach a crypto stream to the output stream.
        Dim crypto_stream As New CryptoStream(out_stream, crypto_transform, CryptoStreamMode.Write)

        ' Encrypt or decrypt the file.
        Const BLOCK_SIZE As Integer = 1024
        Dim buffer(BLOCK_SIZE) As Byte
        Dim bytes_read As Integer

        Me.cmdEncrypt.Enabled = False

        Do
            ' Read some bytes.
            bytes_read = in_stream.Read(buffer, 0, BLOCK_SIZE)
            If bytes_read = 0 Then Exit Do

            System.Windows.Forms.Application.DoEvents()

            ' Write the bytes into the CryptoStream.
            crypto_stream.Write(buffer, 0, bytes_read)
        Loop

        ' Close the streams.
        crypto_stream.Close()
        in_stream.Close()
        out_stream.Close()
        FileClose()

        Me.cmdEncrypt.Enabled = True
How could I, if possible, encrypt one byte, then write it to a file and take the next byte, etc...