I have a VB6 program that has several forms and modules. The frmMain form uses the Form_KeyDown event, which used to work.
I have been doing a ton of editing on this program, and now, when I run the app (in the VB6 IDE), the Form_KeyDown event will not fire when I hit any key. (I set a breakpoint on the first statement in Sub Form_KeyDown(KeyCode As Integer, Shift As Integer), [which is: Debug.Print "Here"], and program control never breaks.
I was guessing that it is a focus problem. The Startup object is Sub Main, which looks like this:
frmMain is the only form that is displayed or loaded (for now), so, once frmMain loads, program control hits Sub Main()'s "End Sub", as shown above, and is done. So, I think frmMain has focus.
I have tried clicking on frmMain (in areas that do not have objects) to try to ensure that frmMain has focus before I hit a key, but that does not help either.