Delayed UI Code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rorybecker@newsgroup.nospam

    #1

    Delayed UI Code

    I am using Studio 2008 with .Net 3.5. and my Brain is Fried :)

    My user will use typical 'next' and 'previous' buttons to navigate records
    in my app.

    They will sometimes be in the habit of hittting the next button repeatedly
    not giving the screen time to finish refreshing it's current record before
    moving to the next.

    I would like my program to work like this....
    -------------------------------------------------------------
    Sub JumpNextRecord( )
    Call ChangeRecordPoi nter
    Call UpdateWinformEl ement1FromDB
    Call UpdateWinformEl ement2FromDB
    Call CallDelayed(Add ressOf UpdateWinformEl ement3FromDB, 250)
    End Sub
    -------------------------------------------------------------

    'UpdateWinformE lement1FromDB' and 'UpdateWinformE lement2FromDB' are simple
    methods but 'UpdateWinformE lement3FromDB' is complex and time consuming and
    therefore I would like to only call it once the user has remained on the
    current record for 250 ms or more.

    This would allow me to hit a NextRecord button 5 times really quickly and
    for the system to only call 'UpdateWinformE lement3FromDB' 1 time once I stop
    doing that.

    Does anyone know how to do this?

    --
    Rory


  • Henning Krause [MVP - Exchange]

    #2
    Re: Delayed UI Code

    Hi Rory,

    see http://weblogs.asp.net/rweigelt/arch...8/5512423.aspx for a
    solution.

    Kind regards,
    Henning Krause

    <rorybecker@new sgroup.nospamwr ote in message
    news:2081c03153 678ca2bf92c6245 15@news.microso ft.com...
    >I am using Studio 2008 with .Net 3.5. and my Brain is Fried :)
    >
    My user will use typical 'next' and 'previous' buttons to navigate records
    in my app.
    >
    They will sometimes be in the habit of hittting the next button repeatedly
    not giving the screen time to finish refreshing it's current record before
    moving to the next.
    >
    I would like my program to work like this....
    -------------------------------------------------------------
    Sub JumpNextRecord( )
    Call ChangeRecordPoi nter
    Call UpdateWinformEl ement1FromDB
    Call UpdateWinformEl ement2FromDB
    Call CallDelayed(Add ressOf UpdateWinformEl ement3FromDB, 250)
    End Sub -------------------------------------------------------------
    >
    'UpdateWinformE lement1FromDB' and 'UpdateWinformE lement2FromDB' are simple
    methods but 'UpdateWinformE lement3FromDB' is complex and time consuming
    and therefore I would like to only call it once the user has remained on
    the current record for 250 ms or more.
    >
    This would allow me to hit a NextRecord button 5 times really quickly and
    for the system to only call 'UpdateWinformE lement3FromDB' 1 time once I
    stop doing that.
    >
    Does anyone know how to do this?
    >
    --
    Rory
    >
    >

    Comment

    • Rory Becker

      #3
      Re: Delayed UI Code

      Hello Henning Krause [MVP - Exchange],
      Thanks Henning

      That's exactly what I was looking for.

      I have had to do a little translation to VB.Net, but it's good to have to
      do that sort of thing occasionally.

      Either way it works perfectly

      Thanks again.


      Comment

      Working...