ITEM('E&xit'),USE(?Exit),MSG('Exit this application'),STD(STD:Close)
END
MENU('&Edit'),USE(?EditMenu)
ITEM('Cu&t'),USE(?Cut),MSG('Remove item to Windows Clipboard'),STD(STD:Cut)
ITEM('&Copy'),USE(?Copy),MSG('Copy item to Windows Clipboard'),STD(STD:Copy)
ITEM('&Paste'),USE(?Paste),MSG('Paste contents of Windows Clipboard'),STD(STD:Paste)
END
MENU('&Window'),MSG('Create and Arrange windows')
ITEM('T&ile'),USE(?Tile),MSG('Make all open windows visible'),STD(STD:TileWindow)
ITEM('&Cascade'),USE(?Cascade),MSG('Stack all open windows'),STD(STD:CascadeWindow)
ITEM('&Arrange Icons'),USE(?Arrange),MSG('Align all window icons'),STD(STD:ArrangeIcons)
END
MENU('&Help'),MSG('Windows Help')
ITEM('&Contents'),USE(?Helpindex),MSG('View the contents of the help file'),STD(STD:HelpIndex)
ITEM('&Search for Help On...'),USE(?HelpSearch),MSG('Search for help on a subject'),STD(STD:HelpSearch)
ITEM('&How to Use Help'),USE(?HelpOnHelp),MSG('How to use Windows Help'),STD(STD:HelpOnHelp)
END
END
TOOLBAR,AT(0,0,256,12)
REGION,AT(8,0,16,10),USE(?Region1),IMM
REGION,AT(28,0,16,10),USE(?Region2),IMM
REGION,AT(48,0,16,10),USE(?Region3),IMM
REGION,AT(68,0,16,10),USE(?Region4),IMM
BUTTON('1'),AT(8,0,16,10),USE(?Button1)
BUTTON('2'),AT(28,0,16,10),USE(?Button2)
BUTTON('3'),AT(48,0,16,10),USE(?Button3)
BUTTON('4'),AT(68,0,16,10),USE(?Button4)
END
END
CODE
LocalRequest = GlobalRequest
OriginalRequest = GlobalRequest
LocalResponse = RequestCancelled
ForceRefresh = False
CLEAR(GlobalRequest)
CLEAR(GlobalResponse)
OPEN(AppFrame)
WindowOpened=True
ACCEPT
CASE EVENT()
OF EVENT:OpenWindow
IF NOT WindowInitialized
DO InitializeWindow
WindowInitialized = True
END
OF EVENT:GainFocus
IF NOT WindowInitialized
WindowInitialized = True
DO InitializeWindow
ELSE
ForceRefresh = True
DO RefreshWindow
END
END
CASE FIELD()
OF ?PrintSetup
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?Exit
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?Cut
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?Copy
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?Paste
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?Tile
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?Cascade
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?Arrange
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?Helpindex
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?HelpSearch
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?HelpOnHelp
CASE EVENT()
OF EVENT:Accepted
DO SyncWindow
END
OF ?Region1
CASE EVENT()
OF EVENT:Accepted
post(event:closewindow,,y)
OF EVENT:MouseIn
gxpos=mousex()
gypos=mousey()+10
tipmsg='This is Button 1.' ! and he does thus and such'
x=start(tippee,20000)
OF EVENT:MouseOut
post(event:closewindow,,y)
END
OF ?Region2
CASE EVENT()
OF EVENT:Accepted
post(event:closewindow,,y)
OF EVENT:MouseIn
gxpos=mousex()
gypos=mousey()+10
tipmsg='This is Button 2. Like Button 1, it uses a text control. Buttons 3 & 4 use a box control & a string control with variables. The box control has the yellow color used in MS Office.'