>Hi,
> Thank you for reply...
> I have put the DOEVENT command in my loop....there are still a few problem..
> 1. if the previous statement before doevent is processing, the event will not fired and it appear like semi click (button down but not clicked)...
Try to change
_VFP.AutoYield = .F.
Probably you can try also different places inside the loop for DOEVENTS
> 2. how could i exit the loop if the click even for the particular button clicked??
I think your button.click() can set some property to .t.,
then inside the loop you check this property after DOEVENTS and EXIT the loop if it is .T.
( button was pressed and it's click() fired)
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison