I am creating and populating the textfile using Free File. However, I would like to be able to encrypt the text file and only allow the app to decrypt it. I have searched PSC and VBF but can only find it when using a textbox. Can anyone assist pls?

This is what I am using to create the file:
(Havent finished the textfile creation part yet, but will give you an idea)
VB Code:
  1. Private Sub cmdSaveFile_Click()
  2.     m_intFF = FreeFile
  3.     m_strDirectory = "Projects"
  4.     m_strSaveProjectFileName = txtFileName.Text
  5.     m_strSDPROJFileName = m_strSaveProjectFileName & ".sdproj"
  6.     m_strFileNameLocation = App.Path & "\" & m_strDirectory & "\" & m_strSDPROJFileName
  7.    
  8.     If Len(Dir$(App.Path & "\" & m_strDirectory & "\", vbDirectory)) > 0 Then
  9.         'do nothing because the Projects directory exists
  10.     Else
  11.         MkDir (m_strDirectory)
  12.     End If
  13.    
  14.     If m_strSaveProjectFileName = vbNullString Then
  15.         MsgBox "You must input a filename!", vbExclamation, "Error Encountered."
  16.         Exit Sub
  17.     ElseIf LCase(Right$(txtFileName.Text, 7)) = ".sdproj" Then
  18.         MsgBox "Input your file name, excluding the file extension.", vbInformation, "Error Encountered."
  19.         Exit Sub
  20.     End If
  21.    
  22.     Open m_strFileNameLocation For Output As #m_intFF
  23.         For Each m_Ctrl In frmMain.lblText
  24.             If m_Ctrl.Index Then
  25.                 With m_Ctrl
  26.                     Print #m_intFF, "###"
  27.                     Print #m_intFF, .Name & "|" & .Index
  28.                     Print #m_intFF, "BorderStyle" & "|" & .BorderStyle
  29.                     Print #m_intFF, "Top" & "|" & .Top
  30.                     Print #m_intFF, "Left" & "|" & .Left
  31.                     Print #m_intFF, "Height" & "|" & .Height
  32.                     Print #m_intFF, "Width" & "|" & .Width
  33.                     Print #m_intFF, "Appearance" & "|" & .Appearance
  34.                     Print #m_intFF, "BackStyle" & "|" & .BackStyle
  35.                     Print #m_intFF, "Caption" & "|" & .Caption
  36.                     Print #m_intFF, "Alignment" & "|" & .Alignment
  37.                     Print #m_intFF, "Color" & "|" & .ForeColor
  38.                     Print #m_intFF, "Size" & "|" & .FontSize
  39.                     'Print #m_intFF, "Style" & "|" & .Font.Style
  40.                 End With
  41.             End If
  42.         Next m_Ctrl
  43.        
  44.         For Each m_Ctrl In frmMain.pbShape
  45.             If m_Ctrl.Index Then
  46.                 With m_Ctrl
  47.                     Print #m_intFF, "###"
  48.                     Print #m_intFF, .Name & "|" & .Index
  49.                     Print #m_intFF, "Top" & "|" & .Top
  50.                     Print #m_intFF, "Left" & "|" & .Left
  51.                     Print #m_intFF, "Height" & "|" & .Height
  52.                     Print #m_intFF, "Width" & "|" & .Width
  53.                     Print #m_intFF, "Appearance" & "|" & .Appearance
  54.                     Print #m_intFF, "BorderStyle" & "|" & .BorderStyle
  55.                 End With
  56.             End If
  57.         Next m_Ctrl
  58.    
  59.         For Each m_Ctrl In frmMain.pb
  60.             If m_Ctrl.Index Then
  61.                 With m_Ctrl
  62.                     Print #m_intFF, "###"
  63.                     Print #m_intFF, .Name & "|" & .Index
  64.                     Print #m_intFF, "Top" & "|" & .Top
  65.                     Print #m_intFF, "Left" & "|" & .Left
  66.                     Print #m_intFF, "Height" & "|" & .Height
  67.                     Print #m_intFF, "Width" & "|" & .Width
  68.                     Print #m_intFF, "Appearance" & "|" & .Appearance
  69.                     Print #m_intFF, "BorderStyle" & "|" & .BorderStyle
  70.                     Print #m_intFF, "Picture" & "|" & .Tag
  71.                 End With
  72.             End If
  73.         Next m_Ctrl
  74.    
  75.     With frmMain.pbWorkArea
  76.         Print #m_intFF, "###"
  77.         Print #m_intFF, .Name
  78.         Print #m_intFF, "Top" & "|" & .Top
  79.         Print #m_intFF, "Left" & "|" & .Left
  80.         Print #m_intFF, "Height" & "|" & .Height
  81.         Print #m_intFF, "Width" & "|" & .Width
  82.         Print #m_intFF, "Picture" & "|" & .Tag
  83.     End With
  84.    
  85.     Close #m_intFF
  86.     Unload Me
  87. End Sub