VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Count Times Form Opened the Easy Way, for initial Help, Password designation, etc.

by Shakeyleg (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 20th October 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Count Times Form Opened the Easy Way, for initial Help, Password designation, etc.

Rate Count Times Form Opened the Easy Way, for initial Help, Password designation, etc.



'temp.txt with the number 1  
'in it. This will work with .dat, .ini, etc.  

Open "C:\\temp.txt" For Input As #1
Input #1, sFile
Text1.Text = sFile
Close #1
If Text1.Text = "1" Then
frmSplash.Show
frmThisFormName.Hide
'replace with this forms real name
Else
Exit Sub
End If
'on this form set the Text1.Text to " ", Visibility to False

'On the One-Time Form Place in the Form Load Sub

    Close #1
    Open "C:\\temp.txt" For Output As #1
    Print #1, Text1.Text
    
    Close #1

'On this form set the Text1.Text to "2", visibility to False
'This will change the number in the text file to 2 and will cause this One-'Time form not to open again. 


Download this snippet    Add to My Saved Code

Count Times Form Opened the Easy Way, for initial Help, Password designation, etc. Comments

No comments have been posted about Count Times Form Opened the Easy Way, for initial Help, Password designation, etc.. Why not be the first to post a comment about Count Times Form Opened the Easy Way, for initial Help, Password designation, etc..

Post your comment

Subject:
Message:
0/1000 characters