I've got an odd behavior where I have a 5-second timer on a form, which when
triggered updatess about 12 label items with data from reading the registry.
If I tap on a main menu then select a submenu item, fairly often (like every
3rd time or so as fast as I can tap) nothing happens. The menu item is
highlighted and the menu then disappears, but no action is taken. When it
does happen to work I hear the Click signifying the tap was "heard". When
it doesn't work I hear no click, yet the menu disappears. Like you'd get if
you tap to bring up the menu, then tap off-menu on purpose.

If I disable the timer it works fine. If I keep the timer but don't do the
registry reads it also works fine. I have other working apps with timers to
update the screen, the clock time, etc, but not from so many registry reads
(using opennetcf registry class). I'm wondering if/how a "longer" timer
routine can somehow muck up the OS's ability to track menu taps on the main
UI (foreground issues btw the main UI area and menu's area?), and what I
might do to fix it. Note there are no other threads involved.

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625

Re: Timer interfering with menu clicks? by Chris

Chris
Tue Aug 23 11:51:34 CDT 2005

Use a Thread.Timer, not a Form Timer so the reg reads on on another thread,
then use Invoke to update your UI labels. That will eliminate any latency
effect of reading the registry.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"Tim Johnson" <tjohnson@high-point.com> wrote in message
news:OvHbWt$pFHA.1028@TK2MSFTNGP09.phx.gbl...
> I've got an odd behavior where I have a 5-second timer on a form, which
> when triggered updatess about 12 label items with data from reading the
> registry. If I tap on a main menu then select a submenu item, fairly often
> (like every 3rd time or so as fast as I can tap) nothing happens. The
> menu item is highlighted and the menu then disappears, but no action is
> taken. When it does happen to work I hear the Click signifying the tap
> was "heard". When it doesn't work I hear no click, yet the menu
> disappears. Like you'd get if you tap to bring up the menu, then tap
> off-menu on purpose.
>
> If I disable the timer it works fine. If I keep the timer but don't do
> the registry reads it also works fine. I have other working apps with
> timers to update the screen, the clock time, etc, but not from so many
> registry reads (using opennetcf registry class). I'm wondering if/how a
> "longer" timer routine can somehow muck up the OS's ability to track menu
> taps on the main UI (foreground issues btw the main UI area and menu's
> area?), and what I might do to fix it. Note there are no other threads
> involved.
>
> --
>
> Tim Johnson
> High Point Software, Inc.
> www.high-point.com
> (503) 312-8625
>
>
>



Re: Timer interfering with menu clicks? by Tim

Tim
Tue Aug 23 12:56:30 CDT 2005

For some reason I thought form timers were only for forms, thread timers
were only for non-forms. Thanks for the clarification!

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625


"Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
news:%23qnnsLAqFHA.3404@TK2MSFTNGP11.phx.gbl...
> Use a Thread.Timer, not a Form Timer so the reg reads on on another
> thread, then use Invoke to update your UI labels. That will eliminate any
> latency effect of reading the registry.
>
> --
> Chris Tacke
> Co-founder
> OpenNETCF.org
> Are you using the SDF? Let's do a case study.
> Email us at d c s @ o p e n n e t c f . c o m
> http://www.opennetcf.org/donate
>
>
> "Tim Johnson" <tjohnson@high-point.com> wrote in message
> news:OvHbWt$pFHA.1028@TK2MSFTNGP09.phx.gbl...
>> I've got an odd behavior where I have a 5-second timer on a form, which
>> when triggered updatess about 12 label items with data from reading the
>> registry. If I tap on a main menu then select a submenu item, fairly
>> often (like every 3rd time or so as fast as I can tap) nothing happens.
>> The menu item is highlighted and the menu then disappears, but no action
>> is taken. When it does happen to work I hear the Click signifying the
>> tap was "heard". When it doesn't work I hear no click, yet the menu
>> disappears. Like you'd get if you tap to bring up the menu, then tap
>> off-menu on purpose.
>>
>> If I disable the timer it works fine. If I keep the timer but don't do
>> the registry reads it also works fine. I have other working apps with
>> timers to update the screen, the clock time, etc, but not from so many
>> registry reads (using opennetcf registry class). I'm wondering if/how a
>> "longer" timer routine can somehow muck up the OS's ability to track menu
>> taps on the main UI (foreground issues btw the main UI area and menu's
>> area?), and what I might do to fix it. Note there are no other threads
>> involved.
>>
>> --
>>
>> Tim Johnson
>> High Point Software, Inc.
>> www.high-point.com
>> (503) 312-8625
>>
>>
>>
>
>