Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh of grid in timer event grabs focus
Message
From
06/06/2010 16:19:15
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Refresh of grid in timer event grabs focus
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01467580
Message ID:
01467580
Views:
169
Update: I commented out the grid refreshes and focus still jumps off and back on the textbox in the other form when my timer fires...

I have a form with two grids (readonly) that has a timer and every 10 seconds it moves records from one table to another. both tables are displayed in separate grids on the form with the timer. when the timer is finished running if any records were moved, it refresh the two grids. If a textbox on another form has focus and the user is typing data into it, when the timer on my form runs and it hits the grid refresh command, focus jumps off of the textbox on the other form and then after the grids refresh, focus returns back to it. when focus is returned to it, the cursor is at the beginning of the textbox so what the user is typing gets shoved into the front of what they had already typed.

Normally I would handle this in the gotfocus of the textbox.

how can I prevent the refresh of the grids from taking focus? I don't want to mess with the gotfocus of the textbox in the other form (there is already code in there it is a very key field on a primary form with a lot of baseclass code). I prefer to handle this entirely on myform if i can.

any ideas?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Next
Reply
Map
View

Click here to load this message in the networking platform