Closing a filepro application Window
Mike Schwartz
mschw at athenet.net
Thu Sep 27 06:53:59 PDT 2007
Wow! That is cool! I wish on the Windows version of filePro that that
was the default! (Modifiable with a PFwinX flag to turn it back on, if
desired, of course...)
Windows users should be able to close a window somehow if they were
really locked up (Alt-F4?), but I don't want it to be so convenient for them
to just click the "X".
It would sure save me a lot of lockfile and other problems on both Unix
terminal emulators and on Windows...
Thanks for that tip! I'm going to test this on my Anzio and then set
that on all my Anzio customers if it works as advertized. (It might be just
the ammunition I need to get my Anzio version 11 and 12 users to finally
upgrade...)
Mike Schwartz
> -----Original Message-----
> From: filepro-list-bounces+mschw=athenet.net at lists.celestial.com
> [mailto:filepro-list-bounces+mschw=athenet.net at lists.celestial.com] On
> Behalf Of Bob Rasmussen
> Sent: Thursday, September 27, 2007 8:19 AM
> To: Don Coleman
> Cc: 'Filepro-List at Lists. Celestial. Com'
> Subject: Re: Closing a filepro application Window
>
> On Wed, 26 Sep 2007, Don Coleman wrote:
>
> > A while back I asked a question as to whether Windows could be
> configured to
> > not allow a user to close said application window by clicking the "X"
> in the
> > upper right corner. Several contributors responded by saying they
> knew of
> > no way to prohibit this within Windows. Now I have two more
> questions:
> > ...
>
> I don't recall the original question, but I'll address it now.
>
> It is possible at a Windows level to disable the X box. You can even
> remove it, if you remove the minimize box and the zoom/restore box
> also.
> You can demonstrate this in Anzio. Go to Edit:Advanced Options:Screen.
> Uncheck "System menu, close box", and hit OK.
>
> I don't know if filePro gives you access to the Windows API; someone
> else
> (Ken?) will have to answer that. If it doesn't, it might be possible to
> write a separate program that would act upon the filePro window. Here
> are
> the calls involved, assuming you have the window handle "H":
>
> GetWindowLong(H, GWL_STYLE)
> returns the current style
> SetWindowLong(H, new_style)
> sets the new style, where new_style is a 32-bit integer
>
> GWL_STYLE is -16
> WS_SYSMENU is hex 80000
>
> So if you GetWindowLong, turn off bit 80000, and SetWindowLong, you'll
> remove the X box completely.
>
> To disable only the X, do
> GetSystemMenu(H, false)
> to get a handle to the system menu (call it hsys), then
> EnableMenuItem(hsys, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED)
> to gray it (and disable) the close box.
>
> SC_CLOSE = 61536;
> MF_BYCOMMAND = 0
> MF_GRAYED = 1
>
>
> Regards,
> ....Bob Rasmussen, President, Rasmussen Software, Inc.
>
> personal e-mail: ras at anzio.com
> company e-mail: rsi at anzio.com
> voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
> fax: (US) 503-624-0760
> web: http://www.anzio.com
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list