Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2006
    Posts
    346

    Need Help/Suggestions

    Hello,

    I have an app that has 97 pages and growing. Each page asks the user different questions - Some question require a PC restart. Is there a way that as the users goes throught the pages answering the questions, that I can some how either have a reg file or ini file remember were they last left off and restart from their. So, if the user is on page 61 and it requires a restart of the PC - When the PC restarts it will automatically launch the app on page 61.

    Any suggestion? Thanks

  2. #2
    Join Date
    Feb 2006
    Posts
    346
    Any help/suggestions would be great. Thanks

  3. #3
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    You already wrote it: use a INI file to save the current page and former selections, read the file on program (re)start, and jump to the latest page in use... So what did I miss, what is your question? It can't be because a missing example on how to use INI files.

    Ulrich

  4. #4
    Join Date
    Feb 2006
    Posts
    346
    I guess the question would be - Would I have to have an ini for each page or could it me done global?

    On restart how would I call the ini to start the app and load correct page?

  5. #5
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Code:
    --On Preload of your first (Load Code)
    sLastPage = INIFile.GetValue("myfile.ini", "User Info", "Last Page");
    
    if sLastPage ~= "" then
    Page.Jump(sLastPage);
    end
    
    --On Show (Save Code)
    sLastPage = Application.GetCurrentPage();
    INIFile.SetValue("myfile.ini", "User Info", "Last Page", sLastPage);
    
    
    --you might find that the code works better On Startup play with placing it in different spots but be sure the load code is ALWAYS before the save code

  6. #6
    Join Date
    Feb 2006
    Posts
    346
    Thanks - I will try that.

  7. #7
    Join Date
    Feb 2006
    Posts
    346
    I get a C Stack overflow when it reads the ini. Don't know why. I placed the code in different locations -same error. Any thoughts

    Thanks

  8. #8
    Join Date
    Feb 2006
    Posts
    346
    Sorry my mistake. I had a typo - The example works great thanks.

  9. #9
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    no prob...glad to help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts