My client wants to me to add navigation keys for the MDIChild forms (Just like a Windows Explorer). When using CTRL + F6 it would go to the next form again and again. My problem is, how can I make disable the buttons (next or back) if I reached the first or the last form? Any ideas? Thanks : )
If the user can switch from the last to the first form directly by using the mouse, then maybe you shouldn't disallow it through the keyboard.
But in any case, how about this...
Let's say you have five child forms, called Form1 through Form5.
Create a public variable, let's say
LastForm.
In each form's Deactivate event procedure, set
LastMsg to
Me.Name.
In the Activate event procedure for Form2, do something like...
If
LastForm = "Form5"
Form5.Show
End If
And something similar, though reversed, in Form5.
This is probably an ugly way of going about it, but seems to work.