You can try using GetActivePanel, which returns the panel handle of the active panel (panel currently receiving keyboard events). Also, as posted before, if you want to programmatically have a panel selected, use SetActivePanel, and pass it the panel handle of the panel you want.
Jeremy L.
National Instruments
Jeremy L.
National Instruments