Hi all,
I'm facing this issue with my word addins. I've added a hook to intercept keypress in MS Word using the SetWindowsHookEx with code from detecting-text-changes-in-word-2016-from-vsto-add-in
BY default MS Word will hide the mouse cursor when a user start typing. I'm using range Information like below to check if the current selection is inside a table or not.
Dim selRange As Microsoft.Office.Interop.Word.Range = Globals.ThisAddIn.Application.Selection.Range
If Globals.ThisAddIn.Application.ActiveDocument.Content.Text.Length > 0 AndAlso selRange.Information(Microsoft.Office.Interop.Word.WdInformation.wdWithInTable) = False Then
---some code
End If
The above condition will make the mouse cursor to reappear, which I want to avoid. But with the following code, the mouse cursor remain hidden when typing.
If Globals.ThisAddIn.Application.ActiveDocument.Content.Text.Length > 0 Then
---some code
End If
Why does the first code quote behave like that? How to make the mouse cursor remain hidden while typing and only appear if I move the mouse?
Thank you.