[RESOLVED] Double click on one MSHFLexgrid clicks on another MSHFlexGrid on another form
Hi.
I've got a form with a MSHFlexgrid object and a button that will popup another form with another mshflexgrid.
In the main form, clicking on a row it will provide details of that record on some textbox. Then I've got a button that will popup another form, so the user can choose a article. He chooses the article by double click and the popup form will unload.
What happens is:
when the user double clicks on the popup mshflexgrid, the parent mshflexgrid clicks to.
How can I resolve this behavior?:confused:
Thanks
Re: Double click on one MSHFLexgrid clicks on another MSHFlexGrid on another form
You evidently have code in the popup grid's DblClick() event that calls the parent grid's Click() event. Set a breakpoint at the top of the popup grid's DblClick() event and trace the code (using F8) to find what's causing the parent grid's Click() event code to run.
Re: Double click on one MSHFLexgrid clicks on another MSHFlexGrid on another form
I remember this bug. The work around is to cause a delay before unloading the Form or use a timer to unload the form.
Code:
Private Sub MSHFlexGrid1_DblClick()
Dim sngTimer As Single
sngTimer = Timer + 0.2
Do Until Timer > sngTimer
DoEvents
Loop
Unload Me
End Sub
Re: Double click on one MSHFLexgrid clicks on another MSHFlexGrid on another form
Thanks Brucevde. That resolved my problem.
Please, clarify me in one thing: what this piece of code do in processing? If I run this code in a slow computer, the user may wait more then the expected?
Thank you again :wave: