One:
Private Sub Timer1_Timer()
KeyBoardCancle 0
End Sub
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public Function KeyBoardCancle(TwoEnable As Integer)
If GetAsyncKeyState(vbKeyMenu) Then
If GetAsyncKeyState(vbKeyTab) Then
If TwoEnable = 1 Then '< imageform and userpass form detect
SetTopMostWindow ImageForm.hwnd, True
SetTopMostWindow LoginForm.hwnd, True
LoginForm.UserName.SetFocus
End If
If TwoEnable = 0 Then '<---- mainform keyboard
SetTopMostWindow MainForm.hwnd, True
MainForm.SetFocus
End If
End If
End If
End Function
Part "One:Working but is there any other way without useing Timer1 and let automaticaly block alt+Tab , alt+F4 , (my defined )
until my form unload those key wont work!.
Two:
I had a Form->BorderStyle = 0 (none)
But when i am Adding MenuItems
BorderStyle becomes Not 0 (none) (automaticaly)
is there any way not to let it automaticaly become not 0 !
Private Sub Timer1_Timer()
KeyBoardCancle 0
End Sub
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public Function KeyBoardCancle(TwoEnable As Integer)
If GetAsyncKeyState(vbKeyMenu) Then
If GetAsyncKeyState(vbKeyTab) Then
If TwoEnable = 1 Then '< imageform and userpass form detect
SetTopMostWindow ImageForm.hwnd, True
SetTopMostWindow LoginForm.hwnd, True
LoginForm.UserName.SetFocus
End If
If TwoEnable = 0 Then '<---- mainform keyboard
SetTopMostWindow MainForm.hwnd, True
MainForm.SetFocus
End If
End If
End If
End Function
Part "One:Working but is there any other way without useing Timer1 and let automaticaly block alt+Tab , alt+F4 , (my defined )
until my form unload those key wont work!.
Two:
I had a Form->BorderStyle = 0 (none)
But when i am Adding MenuItems
BorderStyle becomes Not 0 (none) (automaticaly)
is there any way not to let it automaticaly become not 0 !