Close Project

Close Project

Post by patrickme.. » Wed, 13 Dec 2000 08:15:17



Does anyone know if there is a way to disable or remove the Close
button from ArcView, I am talking about the standard Windows Close
Button in the upper right hand corner.  I do not want a user to save
any changes, other than myself.  I have written a script that uses the
project.save system script that then requires a password to complete
the save.  I just need to disable the windows close button, that then
responds with, Do you want to save ...

Thanks,

Patrick

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Close Project

Post by Pieter Geert van den Beuke » Wed, 13 Dec 2000 15:44:07


Hi Patrick,
You can disable the X-button with a DLL call. Run the following script (as
Startup script in your project for instance):

'-----
'Start script
userDLL = DLL.Make("c:\winnt\system32\user32.dll".AsFileName)
EnableCloseWindow = DLLProc.Make(userDLL,
                                 "GetSystemMenu",
                                 #DLLPROC_TYPE_INT16,
                                 {#DLLPROC_TYPE_INT32, #DLLPROC_TYPE_INT16})
BorroX = DLLProc.Make(userDLL,
                      "RemoveMenu",
                      #DLLPROC_TYPE_INT16,
                      {#DLLPROC_TYPE_INT32, #DLLPROC_TYPE_INT32,
#DLLPROC_TYPE_INT16})

ReDrawFunc = DLLProc.Make(userDLL,
                          "DrawMenuBar",
                          #DLLPROC_TYPE_INT16,
                          {#DLLPROC_TYPE_INT16})

AVWindowHandle = DLL.GetAVWindowHandle 'Arcview Window

Result = EnableCloseWindow.Call({AVWindowHandle,0}) '0 disabled , 1 enabled

'eliminate from the menu the last button(close)
Result2 = BorroX.Call({Result,6,"0x400".AsNumber})

'eliminate the next to the last element (separator)
Result3 = BorroX.Call({Result,5,("0x400").asnumber})

ReDrawFunc.Call({AVWindowHandle})
'End script
'----


Quote:> Does anyone know if there is a way to disable or remove the Close
> button from ArcView, I am talking about the standard Windows Close
> Button in the upper right hand corner.  I do not want a user to save
> any changes, other than myself.  I have written a script that uses the
> project.save system script that then requires a password to complete
> the save.  I just need to disable the windows close button, that then
> responds with, Do you want to save ...

> Thanks,

> Patrick

> Sent via Deja.com http://www.deja.com/
> Before you buy.


 
 
 

1. Closing Hyperlinked docs closes Project file

I am having a heck of a time trying to figure this out...

If I insert a hyperlink to a file (for example a Word doc
{or it could be anything.. Excel file, Visio diagram})
into a project and then click on the hyperlink and open
the document everything is fine. If I close the Word doc
(or close Word), then my Project file closes also. (The
MPP file closes, MS Project stays open)

Why is this?
I have some externally generated project files with
hyperlinks to documents that don't do this?!

If I right click the hyperlink and select 'Open in New
Window', I can close the linked doc without causing the
project file to close.
There must be a way to fix this...
Using Project 2000 SR1 under Win2K

2. Favourite game? Not the "best"

3. closing apps launched with Aspexec.dll - for home automation project

4. Pinball Dreams Scores

5. Application error on closing a MS-SQL project file

6. Outlook Express6 Add Idenity

7. Project closes automatically

8. H/W,S/W details for Sharp YO-380 to PC

9. Office closes after installation of Project 2000

10. Project closes as soon as it starts

11. Open and close tasks in Project 2002

12. Compare Versions Macro / Project Close Macro?

13. how to close a word session from sas without closing other active word session(s)