WD6X: DlgFocus Statement Does Not Change the Focus in MacWord |
Q126024
The Microsoft WordBasic DlgFocus statement is used within a dialog function to set the focus on the dialog box control. However, the DlgFocus statement does not change the focus in a Word 6.0 for the Macintosh dialog box.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please see the following page on the World Wide Web:
http://www.microsoft.com/partner/referral/For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://support.microsoft.com/directory/overview.aspWhen a dialog box control has the focus, it is active and responds to keyboard input. For example, if a text box has the focus, any text you type appears in that text box. Buttons with focus appear to have a darker ring around them. The DlgFocus statement does not return a WordBasic error when used in a Macintosh Word macro, but the focus is not set to the control.
Sub Main
Begin Dialog UserDialog 320, 144, "Microsoft Word", .MyDlgFunction
OKButton 10, 6, 88, 21
CancelButton 10, 30, 88, 21
PushButton 57, 101, 88, 21, "Mybutton", .MyControl1
End Dialog
Dim dlg As UserDialog
x = Dialog(dlg)
End Sub
Function MyDlgFunction(identifier$, action, suppvalue)
Select Case action
Case 1
DlgFocus "MyControl1"
Case Else
End Select
End Function
"Microsoft Word Developer's Kit," version 6.0, Chapter 5, "Working with Custom Dialog Boxes"
Additional query words: dynamic
Keywords : kbmacro kbprg kbdtacode kbmacroexample macword word6
Issue type : kbinfo
Technology : kbWordSearch kbWordMSearch
|
Last Reviewed: December 29, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |