|
-
Apr 9th, 2007, 07:06 AM
#1
Thread Starter
Hyperactive Member
[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?
Thanks
-
Apr 9th, 2007, 10:31 AM
#2
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.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Apr 9th, 2007, 10:38 AM
#3
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
-
Apr 9th, 2007, 11:07 AM
#4
Thread Starter
Hyperactive Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|