Results 1 to 4 of 4

Thread: Timer Class Event Problem

  1. #1

    Thread Starter
    Hyperactive Member Bananafish's Avatar
    Join Date
    Jan 2001
    Posts
    394

    Timer Class Event Problem

    Hi

    I am trying to write a process that can detect application timeouts and I am doing it by creating a class that inherits systems.Timer.Timer

    The timer is set at an interval of 1000ms and basically it checks thje position of the mouse pointer and if it hasn't moved for 20 minutes (a specified time) it will raise a AppTimeout event.

    So far so good. (It does a little more than that as it tests for key presses also but this isn't relevant to the problem.

    Now when the application that uses this class, detects this event it will performs a function could

    ProcessLockScreen

    that effectivly displays a form forcing the user to re-enter a user and password. Obviously this form is displayed modally - in fact it is displayed via a separate dll..

    Now if I perform this section via the menu or toolbar - everything is ok. However if I perform the same section from the new class event - the Lock Screen form is still displayed. But not modally. Which kind of defeats the point. (I can still access the underlying form).

    Has anyone any ideas on what is happening here, and how I could get around it?

    Thanks

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Maybe the form is being created on a different thread and so it doesn't stay in front of forms in other threads. I'm not sure if that is correct or not, just a theory.

  3. #3

    Thread Starter
    Hyperactive Member Bananafish's Avatar
    Join Date
    Jan 2001
    Posts
    394
    yes - that was my guess too Edneeis.

  4. #4
    Lively Member matt3011's Avatar
    Join Date
    May 2002
    Location
    France
    Posts
    82
    I use a form using a dll class. When i open a form with showdialog in the dll class, it remain displayed over all main app windows.
    So try with myform.showdialog

Posting Permissions

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



Click Here to Expand Forum to Full Width