Project Application Window Disappears Using AppMove Method
  
PSS ID Number: Q113582
Article last modified on 09-18-1994
 
4.00
 
WINDOWS
 

--------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft Project for Windows, version 4.0
--------------------------------------------------------------------
 
SYMPTOMS
========
 
In Microsoft Project, if you use the AppMove method in a macro to
move the Microsoft Project application window, no error message
appears if the argument values cause the window to move entirely off
the screen.
 
CAUSE
=====
 
This is by design in Microsoft Project, and is a desired behavior if you
want to hide the Microsoft Project application using a macro without
closing the program.
 
WORKAROUND
==========
 
To restore the Microsoft Project application window if it has been
accidentally moved entirely off the screen when you use the AppMove
command in a macro, do the following:
 
1. To activate Microsoft Project, press CTRL+ESC to run the Task List,
   select Microsoft Project from the Task List, and choose Switch To.
 
2. Press ALT+SPACEBAR to activate the application Control menu and then
   press M to choose the Move command (you still won't see anything appear
   on the screen).
 
3. Press any of the direction keys (RIGHT ARROW, LEFT ARROW, UP ARROW or
   DOWN ARROW) and move the mouse pointer to the center of your screen. The
   outline of the application window appears and moves with the mouse
   pointer. Click the mouse when this outline appears in the correct
   position.
 
MORE INFORMATION
================
 
In Microsoft Windows, you can move application windows on the screen so
that portions of the window are barely visible. As long as a window border
is displayed, you can click and drag the border until the window is visible
again. However, it is possible to use the AppMove command in a Microsoft
Project macro to move the Microsoft Project application window entirely off
the screen so that you cannot drag it back on.
 
Note that the arguments you use with the AppMove command, xPosition, and
yPosition are measured in pixels by default.
 
Steps to Reproduce Behavior
---------------------------
 
1. In a new project, choose Macros from the Tools menu. In the Macros
   dialog box, choose New.
 
2. In the Macro name box, type "Move_Project" (without the quotation
   marks). Choose the Options button, and under Store Macro In, select the
   Current Project File option. Choose OK.
 
3. In the new module, enter the following:
 
      Sub Move_Project
          AppMove XPosition:=2000, YPosition:=2000
      End Sub
 
4. From the Tools menu, choose Macros. From the Macro Name list, select
   Move_Project and choose Run.
 
No part of the Microsoft Project application window is visible.
 
REFERENCES
==========
 
For more information about the AppMove Method, choose the Search
button in Help and type:
 
   AppMove
 
KBCategory: kbusage
KBSubcategory:
 
Additional reference words: 4.00
=============================================================================
Copyright Microsoft Corporation 1994.
