Link to home
Start Free TrialLog in
Avatar of graflunds
graflunds

asked on

msflexgrid control on a form

I've got a msflexgrid control with about 5 fields on a vb form.  When I click into the flexgrid control, I can't tab through the fields specified.  It tabs right out to the next tabstop on specefied on the form.

Is there a way I can tab through that flexgrid and then after the last tab in the flexgrid, tab through the rest of the form?

Thanks,
Avatar of krees
krees

there is no built-in function for the flexgrid to allow this kind of operation, using that to iterate from the cells.

Using the keyup and keydown events you cannot do it also because VB doesnt catch the <TAB> in these events.

If you really need to do that, you may want to check ark's code, which is a SyshookDLL file that will allow you to catch every keystroke sent to the form.

With that, you can check with is the cell you are into, and when the user tabs until the last cell, sent it to the next tabstop.

hope this helps...

(download syshookdll.zip from http://www.chris-strevel.com.mx/syshookdll.zip)
a local hook into the keyboard messaging system is the only way to achieve the result you are after.  vbaccelerator.com has a good hook dll with source code, and O'reilly has a book "Subclassing and hooking with visual basic" that looks pretty good too.


Jer
hi jer
most experts do not propose answers unless you are pretty sure the are the solution, it's better to post as a comment so the question is not locked and is available to the rest of the experts as an open question.
Check https://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp to be more clear.
hey krees,

thanks for the info... I thought that I was providing a solution, didn't realize that the answer involved actual source code.  Anyway, I will try to limit my responses... again thanks for the input.
There is no built in function to do this.
This is indirectly possible by placing a textbox with the same coordinates as a cell using left and top properties and make the border of the textbox as none. on th lost focus event of the textbox shift the coordinates of the textbox to the next cell and get the focus to that textbox in the next cell.

regards
Avatar of graflunds

ASKER

The problem I'm having is I've created this flexgrid from a separate vb project, and made it an activex (ocx) control.  When I run just the separate activex control, the tabs work.  But when I add the control into the form of my main VB project, it tabs right out.  

I've downloaded the syshook file, but am unsure how to use it?

Any help?

Thanks,

Sean
hi jer,

sorry to disturb u at this moment.from the question that u have posted i guess u must be involving grids.Presently i had a hard time using grids cos currently i'm doing a search fundtion where all the result have to be presented in grids format erm do u have any idea how the result can be presented in grid or table format.Sorry to ask u a qns here....


Does anyone Knows how to solve this Qns....?
Will be very Grateful to all of u Thanks a million......

Asta..
ASKER CERTIFIED SOLUTION
Avatar of bhh
bhh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If this proposed answer has helped you, please accept it, grade it and close this question.  If it did not, reject it and add comments as to your progress and what else is needed.  If no action is taken here by next week, we'll need to decide this outcome.  Expert input always welcome as well.

Thanks,
Moondancer
Community Support Moderator @ Experts Exchange