GP Fault After Pressing TAB in User-Defined Dialog Box |
Q112778
When you run a WordBasic macro that displays a user dialog, a general protection (GP) fault may occur after you press TAB. The macro in the "More Information" section below in this article demonstrates this behavior.
This happens if the focus switches to a text control in the user dialog when you press TAB.
Microsoft has confirmed this to be a problem in Word versions 6.0 and 6.0a for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
The macro below demonstrates this behavior.
IMPORTANT: If you run this macro, a GP fault will occur on your
computer and you may lose unsaved data in any open applications.
Sub MAIN
Begin Dialog UserDialog 285, 85, "No Focus on Text!", .DlgFunction
OKButton 191, 58, 88, 21
Text 42, 15, 216, 13, "Don't Set the Focus to Text!", .sText
End Dialog
Dim dlg As UserDialog
x = Dialog(dlg)
End Sub
Function DlgFunction(id$, Action, Other)
Select Case Action
Case 1
DlgFocus$ 1
x$ = DlgFocus$()
Case 2
If id$ = "OK" Then
DlgFunction = 0
Else
DlgFunction = 1
End If
Case Else
End Select
End Function
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT
YOUR OWN RISK. Microsoft provides this macro code "as is" without
warranty of any kind, either express or implied, including but not
limited to the implied warranties of merchantability and/or fitness
for a particular purpose.
Additional query words: 6.00a gpf winword word6
Keywords : kbofficeprog
Issue type :
Technology :
|
Last Reviewed: March 28, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |