Link to home
Start Free TrialLog in
Avatar of fathimasulthan
fathimasulthan

asked on

Traping 'Ctrl + Tab"

Hi all,
  I have an MDI form and Many child forms. From One child form I need to call another child form. as...
  Mdi  - parent form
  Form1 - Child form
  Form2 - child form
  Form3 - Child form


On MDi form, Form1 is Loaded, From Form1 i am calling Form2. I need to keep the Form1 one at the back of form2. When I press 'Ctrl+ Tab" , the Form1 comes front. I do not want the form1 to come to the front when I press 'Ctrl +Tab' . Can anybody give me the solution.

With Thanks
FAthima
Avatar of DrMaltz
DrMaltz

The solution to this problem is trap the accelerator keys in the KeyDown event of those control and process them yourself.

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
   
If KeyCode = 17 Then 'Ctrl+Tab was pressed..

    MsgBox "Whassup"
    End If
End Sub

Very simple logic, but you get to control what happens to the form that has focus when the Ctrl+Tab key is pressed.

Good Luck,

DrMaltz.


Avatar of DanRollins
Hi fathimasulthan,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept DrMaltz's comment(s) as an answer.

fathimasulthan, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
ASKER CERTIFIED SOLUTION
Avatar of SpideyMod
SpideyMod

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