I've been using this code for ages in triggering TAB in VB6 using XP as my OS.

sendkeys Code:
  1. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  2. If KeyCode = vbKeyReturn Then
  3.     SendKeys vbTab
  4. End If
  5. End Sub

I'm using Vista Business now as my OS and I'm having error problems with the code above. Is there a way to to use the code above in vista? or can you suggest an API that I can use for vista? Any help is greatly appreciated.