Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Help with Time-Out

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help with Time-Out

    Hi,

    I want to have a form return to the mainmenu if not used for 30 seconds - a confidentiality requirement.

    I went to form Properties, set the timer for 30 seconds. Then went to the Ontimer Event and entered a script to goto to MainMenu.

    I opened the form, and YES it worked as designed!

    One Problem. I now have only 30 secondds to work with the form since it times-out in 30 seconds regardless of whether or not it is in use.

    Where do I put the code to open MainMenu that will count seconds from the last input?

    Thanks

    Tom

    #2
    RE: Help with Time-Out

    I'll be interested to see how responses to this are - my first thought is to use a variable that is reset to zero at the form's onkey event - thus any key would start the timing over again
    Cole Custom Programming - Terrell, Texas
    972 524 8714
    [email protected]

    ____________________
    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

    Comment


      #3
      RE: Help with Time-Out

      Martin,
      Your idea works. Create a layout variable that is numeric. (I called it counter). On the OnKey event put this line first.

      counter = 0

      Set the timer for 1 sec. On the Ontimer event place the following

      counter = counter + 1
      if counter = 30
      parentform.close() 'or whatever
      end if

      If the user uses any key, counter returns to 0. But if there is no key activity for 30 seconds, the Ontimer action will fire. Neat idea!

      Jerry

      Comment


        #4
        RE: Help with Time-Out

        Jerry and Martin,

        Thank you very much. I really appreciate the help.

        Tom

        Comment


          #5
          RE: Help with Time-Out

          Well, let look at this again.

          Upon further exam, I find that on entering a form for the first time this works fine, but upon re-entering it doesn't work dependably. It seems that if a field has focus, it also doesn't fire.

          But we are close. Any other ideas?

          Tom

          Comment


            #6
            RE: Help with Time-Out

            Tom, I haven't had a chance to try this myself, but try the form [onactivate] or [oninitialize] to set and start the process, or see if you have the focus land some place other than at a field[with blinking cursor] - like at a button or something if that gets it started.
            Cole Custom Programming - Terrell, Texas
            972 524 8714
            [email protected]

            ____________________
            "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

            Comment


              #7
              RE: Help with Time-Out

              Thomas,
              My test form works reliably even on re-entry and regardless if a field has focus. Be sure the form variable is entered as a layout variable and assign a default value of 0. Every time the form is closed and reopened, the variable resets to 0. If you are just hiding the form, the place

              counter = 0

              on the on activate event.

              Jerry

              Comment


                #8
                RE: Help with Time-Out

                Jerry,

                I think your suggestion takes me back to where I started. Won't this time-out regardless of any form activity?

                I'd like to have the event NOT occur unless no activity occured on the form - no keystrokes - for XXXseconds.

                Placing the script on the OnKey event seems to make sense, but didn't work dependably when closing and reopening the form. I'm having the script return the user to the MainMenu.

                Thanks for your suggestions.

                Tom

                Comment


                  #9
                  RE: Help with Time-Out

                  Perhaps an example might be easier to understand. Attached is a little app with a mainmenu form and a form that opens with a timer that closes the form after a period of inactivity. Currently, it is set at 10 seconds for quicker action. (I hate to wait). If you leave the menu form running, closing the timer form will send focus back to the menu. I normally leave the main menu running in the background.

                  Jerry

                  Comment


                    #10
                    RE: Help with Time-Out

                    EXCELLENT! Just what I was looking for.

                    Thank You.

                    Tom

                    Comment


                      #11
                      RE: Help with Time-Out

                      What if the user uses only the mouse? How do you reset the counter when the mouse is clicked?

                      Charles

                      Comment


                        #12
                        RE: Help with Time-Out

                        Hi,

                        I guess instead of activating another form when the time-out is reached, you could show a message (again for a time limited period) which would permit resetting the time, or continuing to the time-out form.

                        Is there not a MouseClick event?

                        Tom

                        Comment


                          #13
                          RE: Help with Time-Out

                          Only the USER has an OnMouse event. After thinking about my question, I came up with a few solutions:

                          A lot of the controls and objects have an OnArrive event that could be used to reset the counter, but this is only fired if the control/object is acutally given focus. (This would watch to make sure the focus is changing).

                          An OnFetch event could reset the counter if the object is a browse table.

                          In other words, as long as the user clicks the mouse, it can be used to reset the counter. It's a lot easier watching the keyboard than the mouse!

                          Comment


                            #14
                            RE: Help with Time-Out

                            Hi everybody,

                            As usual a couple of articles by Dr. Wayne bear on this issue. In a November 1998 Alpha Forum article entitled "Locking Up After Careless Users", he suggests attaching the code to reset the counter to the forms' OnEnter, OnFetch, OnSave, and OnKey events. I might consider adding the form's OnActivate to the list in order to capture the activity of users navigating among an application's forms.

                            This last measure might obviate the need to use another of Dr. Wayne's techniques. In the "Mouse Rollover" article at Learnalpha.com he demonstrates how to put a user object on top of a button. This blocks you from pushing the button but you can program the user object to push the button. And since the user object has the on_mouse event it can also be programmed to reset the counter.

                            I've wondered why we needed the ability to program a control to press a button but it is worth remembering. Just
                            last week I solved a nasty little context problem by having a toolbar item press a form's button which was hidden--yes you can use it even if it is hidden. The toolbar item didn't have any events to program but the button did!

                            So obvious in retrospect.

                            Bill
                            Bill
                            Bill Hanigsberg

                            Comment

                            Working...
                            X