check box validation in vb 6.0 to be checked always(permenant for future works)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • YesKayal
    New Member
    • Mar 2014
    • 1

    #1

    check box validation in vb 6.0 to be checked always(permenant for future works)

    i've done a project on VB6.0 for e-ticket booking.When one time i've checked a check box i need to be checked permenant(becau se its seat no).Once when i closed the project another time it comes as a new one.How could i do this?
    Just help me!
  • Honduras2811
    New Member
    • Apr 2014
    • 21

    #2
    Assuming you can't set it at design time, this is a fairly common problem, and there are several ways to fix it, but I need to know a little more. Does your application use a database or something like that? Does the application keep track of multiple bookings, or only one?

    The solution is that the value of the checkbox needs to be stored somewhere outside the program. If you use an external database to store information, you can add a field to it. If you aren't using any external files yet you have at least three options.

    1. You can create a file to store the checkbox state and read the file every time the application opens. If you only handle one ticket at a time, you don't even need to put anything meaningful in the file. Just create it if the box is checked. Then when the application starts, check to see if that file exists. If it does, have the application check the checkbox. This would even work if you handle multiple tickets. Just create files as needed with the ticket number as the filename. You would need to clean those files up every now and then, though, to get rid of ones that are no longer needed.
    2. Basically the same, but use a standard .ini file.
    3. Basically the same, but store the value in the registry. It's easier than you think, and you don't need to worry about the file accidently being deleted.

    Comment

    Working...