VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



App Checks If This Is The First Time The User Opens The File By Creating A Textfile..

by ThaVolt (1 Submission)
Category: Encryption
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 30th June 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

App Checks If This Is The First Time The User Opens The File By Creating A Textfile..

Rate App Checks If This Is The First Time The User Opens The File By Creating A Textfile..



    On Error Goto ErrorHandler
    Open "C:\Firsttimeopen.txt" For Input As #1 'App attempts To open  
    'the textfile
    Input #1, line1$ 'Reads Line 1 From The Textfile
    Close #1
    If line1$ = "Blabla" Then MsgBox "This is Not the first time u open         me", , "Info" Else
    Open "C:\Firsttimeopen.txt" For Output As #2 'Creates The Textfile
    Print #2, "Blabla" 'Creates The First Line
    Close #2
    ErrorHandler:
    MsgBox "This Is The First Time You Open Me", , "Info" 
    'The File Was Not There So
    'Its the first time the file has been 
    'openend
End Sub


Download this snippet    Add to My Saved Code

App Checks If This Is The First Time The User Opens The File By Creating A Textfile.. Comments

No comments have been posted about App Checks If This Is The First Time The User Opens The File By Creating A Textfile... Why not be the first to post a comment about App Checks If This Is The First Time The User Opens The File By Creating A Textfile...

Post your comment

Subject:
Message:
0/1000 characters