Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ailtom  
#1 Posted : Wednesday, February 14, 2018 1:41:11 PM(UTC)
ailtom

Rank: Newbie

Groups: Registered
Joined: 2/13/2015(UTC)
Posts: 4

Thanks: 1 times
Hi, I recently bought iGrid650 ActiveX I started using it and realized that in every form I use it the escape key is no longer received by the keydown event of the form if the focus is on iGrid, even with the keypreview property as true. Is there any way around this situation? I thank everyone.
Igor/10Tec  
#2 Posted : Wednesday, February 14, 2018 2:25:40 PM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,101

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
What is your development environment? Can you show your forms with iGrid and accompanying code?

I admit that there can be some problems with passing key strokes through iGrid to the form because of the low-level COM keyboard hooks needed for proper work of iGrid in specific development environments like MS Access.
ailtom  
#3 Posted : Wednesday, February 14, 2018 3:28:54 PM(UTC)
ailtom

Rank: Newbie

Groups: Registered
Joined: 2/13/2015(UTC)
Posts: 4

Thanks: 1 times
hi, environmen is visual basic 6.0

the code is :

'
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then Unload Me
End Sub
'
igridform.png

this is a window where do a search for custumers
it's very simple.

has only 5 controls: 2 label. 1 textbox 1 combo box and 1 igrid control.,

load all records into igrid and in text change event do a search with l = cBusca.FindSearchMatchRow(cmbBusca.Text, bString, , True, igSearchMatchStartsWith);

if the user choose close without get any record, he simple press escape. allright. but not when igrid has the focus. but in the igrid the event keydown receiv the keycode escape. but the form not. the for has keypreview set to true.



thanks.
Igor/10Tec  
#4 Posted : Friday, February 16, 2018 9:37:30 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,101

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
I investigated this issue. Yes, iGrid "eats" some keystrokes like Escape because of the aforementioned low-level COM keyboard hook used for reliable keyboard processing in all development environments including MS Access or MS Office Word/Excel VBA. You may encounter the same effect for other iGrid control keys, such as Backspace, F2 or F4.

At the moment, I see only one workaround. You need to duplicate your logic for the Escape button in iGrid's KeyDown event:

Code:

Private Sub iGrid1_KeyDown(KeyCode As Integer, Shift As Integer, bDoDefault As Boolean)
   If KeyCode = vbKeyEscape Then Unload Me
End Sub

Igor/10Tec  
#5 Posted : Friday, March 15, 2019 9:17:43 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,101

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
This issue has been fixed in the iGrid v7.0.15 released today. Now there is no need to duplicate the Escape key logic in iGrid's KeyDown event handler.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.