Click to See Complete Forum and Search --> : Handling multiple clicks


Purnima
July 7th, 2000, 04:33 AM
Hi,
I need your help badly.
I have a client of mine who is using TrueDBGrid.
If he clicks over one of the cells many times
his grid freezes for sometime.
I understand that this happens due the fact that
VB takes time to process those clicks.
I tried DoEvents however, that makes the program
to end.
Is there a way to minimize the time taken by VB
to process those clicks and so that the grid doesn't
appear to be frozen?
Please help me out someone.
Any kind of pointers would also be appreciated.
Thanks in advance.
Regards,
Purnima

AnneWright
July 10th, 2000, 05:52 AM
What I do is put a variable in the function which it true if the code is being processed, so the first thing that happens if it is called again is it exits the routine. i.e

sub grid_click()
static bWorking as boolean

if bWorking then exit sub
bWorking=true
{code}
bWorking=false
exit sub




Regards

Anne Wright
Wright Computing