C
Chris
Hello,
I am using OWC11 in VB6.
I am unable to prevent the event of F1 key.
I did try using the Spreadsheet1_keydown event()
And use the findWindow API to close the window.
it works fine, if the user tries to hit F1 twice.
On the third event of F1 key is pressed, it terminates the application.exe
below is the code I am using
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As long
Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd
As Long, ByVal wMsg As Long, ByVal wparam As Long, ByVal lparam As Long) As
Long
Const WM_CLOSE=&H10
Sub DoCloseOWCHelpFile()
Dim CloseIt As Long
CloseIt=FindWindow(vbNullString, "Microsoft Office 2003 Spreadsheet
Component Help")
PostMessage CloseIt, WM_CLOSE, Clng(0), CLng(0)
End Sub
Can you help me out with a possible solution to prevent the F1 key from
showing the OWC help file.
Cheers
Chris
I am using OWC11 in VB6.
I am unable to prevent the event of F1 key.
I did try using the Spreadsheet1_keydown event()
And use the findWindow API to close the window.
it works fine, if the user tries to hit F1 twice.
On the third event of F1 key is pressed, it terminates the application.exe
below is the code I am using
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As long
Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd
As Long, ByVal wMsg As Long, ByVal wparam As Long, ByVal lparam As Long) As
Long
Const WM_CLOSE=&H10
Sub DoCloseOWCHelpFile()
Dim CloseIt As Long
CloseIt=FindWindow(vbNullString, "Microsoft Office 2003 Spreadsheet
Component Help")
PostMessage CloseIt, WM_CLOSE, Clng(0), CLng(0)
End Sub
Can you help me out with a possible solution to prevent the F1 key from
showing the OWC help file.
Cheers
Chris