WordBasic Examples: AppWindow |
Q109744
This article contains an example that demonstrates the use of the following WordBasic statements and functions:
AppWindowHeight, AppWindowHeight()This article supplements the information in online Help. To open this Help topic, choose Contents from the Help menu and then choose the "Programming With Microsoft Word" topic.
AppWindowPosLeft, AppWindowPosLeft()
AppWindowPosTop, AppWindowPosTop()
AppWindowWidth, AppWindowWidth()
AppWindowHeight [WindowName$,] Height
AppWindowHeight([WindowName$])
Sub MAIN
x = 0
state = AppMaximize()
If state = - 1 Then AppRestore
x = AppWindowHeight()
MsgBox "The height of this window is: " + Str$(x)
AppWindowHeight x - 100
MsgBox "The height of this window is: " + Str$(x - 100)
End Sub AppWindowPosLeft [WindowName$,] HorizPos
AppWindowPosLeft([WindowName$])
Sub MAIN
state = AppMaximize()
If state = - 1 Then AppRestore
x = AppWindowPosLeft()
MsgBox "The distance from the left is: " + Str$(x)
AppWindowPosLeft x + 100
MsgBox "The distance from the left is: " + Str$(x +100)
End Sub AppWindowPosTop [WindowName$,] VertPos
AppWindowPosTop([WindowName$])
Sub MAIN
x = 0
state = AppMaximize()
If state = - 1 Then AppRestore
x = AppWindowPosTop()
MsgBox "The distance from the top is: " + Str$(x)
AppWindowPosTop x + 100
MsgBox "The distance from the top is: " + Str$(x + 100)
End Sub AppWindowWidth [WindowName$,] Width
AppWindowWidth([WindowName$])
Sub MAIN
x = 0
state = AppMaximize()
If state = - 1 Then AppRestore
x = AppWindowWidth()
MsgBox "The width of this window is: " + Str$(x)
AppWindowWidth x / 2
MsgBox "The width of this window is: " + Str$(x / 2)
Additional query words: 6.0 winword word6 7.0 word95 word7
Keywords : kbmacroexample
Issue type :
Technology :
|
Last Reviewed: November 4, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |