以下是取錄 CWW 的程式我在使用時發現其 Focus(駐點) 無法進入Frame 中的 TextBox 與 MaskedBox 且只
能用在只能在 From , 不知哪位高手能幫小弟解決之...... 謝謝
Private Declare Function GetNextDlgTabItem Lib "user32" (ByVal hDlg As Long, _
ByVal hCtl As Long, ByVal bPrevious As Long) As Long
Private Declare Function SetDlgFocus Lib "user32" Alias "SetFocus" _
(ByVal hwnd As Long) As Long
'移到下一個可Focus的Control
Private Sub NextDlg()
Dim hwnd5 As Long
hwnd5 = GetNextDlgTabItem(Me.hwnd, Screen.ActiveControl.hwnd, 1)
Call SetDlgFocus(hwnd5)
End Sub
'移到上一個可Focus的Control
Private Sub PrevDlg()
Dim hwnd5 As Long
hwnd5 = GetNextDlgTabItem(Me.hwnd, Screen.ActiveControl.hwnd, 0)
Call SetDlgFocus(hwnd5)
End Sub