Problem with MDI Child form access keys.

gantibabu

New member
Joined
Jan 12, 2006
Messages
2
Location
Albany, GA
Programming Experience
5-10
Hi all, need help in knowing VB.Net better.

I have one MDI form and two child forms say Form1 and Form2. I have a button say "&Save" on each of the forms and i have both the forms displayed(or should i say, loaded). Now if i have Form2 active and press "Alt + S", i would expect the click event of the save button on Form2 to fire, instead, i find the click event of the save button on Form1 firing and unless i close Form1 which is behind Form2, i am unable to fire the click event on the currently active Form2.

If you are with me till here, i request your help in clarifying this strange behaviour. I am new to .Net but have good experience in VB6.

Hope there is a solution to this problem. I would wait for an answer before i drop the idea of having access keys at all.

Thanks in anticipation.
 
Ok, found a solution myself.

The solution was to use the ProcessDialogChar function to check
the charcode and call the appropriate event.

Thanks for viewing.
 
Back
Top