topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 3:34 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: "Stop Me From Closing It" - prevent easy closing of a program  (Read 58392 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Sometimes i have a web page open in my browser or something, and i want to leave it open for a while (like a few hours).
but i inevitably forget and at some point end up closing the program while tidying up the desktop.

i wonder if it wouldnt be possible to have a tray based program that let me sort of "lock" and "unlock" a running program,
which would just remove its "close" button maybe (it'd be nice of the close menu was gone from taskbar right click menu too).

so i'm not looking for some high security thing, just a way to prevent casual closing in a moment of forgetfullness.

ps. this might be a stupid request  :-\

« Last Edit: February 07, 2006, 02:50 AM by brotherS »

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #1 on: December 19, 2005, 02:10 AM »
 :) Great idea! Can't be done in AutoHotkey, i think, as it doesn't have a global message hook.

Skrommel

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #2 on: December 19, 2005, 02:20 AM »
no idea if it can be done in ahk, but i was thinking that it might be possible to simple modify the "system menu" property of a window that would disable its clost button.. i could be wrong though.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #3 on: December 19, 2005, 05:41 AM »
Not at all stupid - I need this too for exactly the same reasons. Actually it would be nice if the close icon could be changed for a padlock or something similar.

There must be a way to do this because DM2 manages to change basic window functionality in all windows.

Actually DM2 has the nice feature of locking windows down to a floating icon which could serve a similar purpose in the interim.

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #4 on: December 19, 2005, 05:55 AM »
i sometimes get into a close everything frenzy and then realise i've closed too much so i have to agree it's a good idea.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #5 on: December 19, 2005, 05:50 PM »
 :) Yes, removing the system menu should work, but it also removes the min and  max as well as the X. It also wouldn't catch ownerdrawn captions.

In AutoHotkey:

WinSet,Style,-0x80000,Calc

I suggest catching WM_Close in a global message hook.

Skrommel

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #6 on: December 19, 2005, 05:55 PM »
yeah, blocking min and max would be unfortunate.

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,260
    • View Profile
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #7 on: December 20, 2005, 04:55 AM »
Here's the/a solution: use Firefox and install the SessionSaver and undoclosetab extensions!  :Thmbsup:

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #8 on: December 20, 2005, 04:57 AM »
Or even use Maxthon - which gives you the option of starting up with all the tabs from the last session.

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #9 on: December 20, 2005, 05:10 AM »
yeah, good point about Maxthon, Carol.

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,260
    • View Profile
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #10 on: December 20, 2005, 01:48 PM »
Or even use Maxthon - which gives you the option of starting up with all the tabs from the last session.
Exactly that is what the SessionSaver extension for Firefox does :)

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #11 on: December 20, 2005, 05:14 PM »
Just pointing out for those that didn't know that it is built in as standard in Maxthon.

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,260
    • View Profile
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #12 on: December 21, 2005, 03:19 AM »
I didn't know that, but I prefer plugins/extensions anyway  :Thmbsup:

Brad

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #13 on: January 07, 2006, 01:19 AM »
I have been using ACTUAL WINDOWS MANAGER from actual tools.
Does exactly what you are asking for and reasonably priced.
http://www.actualtools.com/

Cheers

Brad

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #14 on: February 07, 2006, 02:34 AM »
Ethan submitted a coding snack that will do this - works very well!!! thanks Ethan!!

in fact, he has allowed us to make it available on the Coding Snacks page, with FULL SOURCE(!)
Download Dkmy (along with his other program Maomi) on the Coding Snacks page: https://www.donation...dingSnacks/index.php


Ethan you rock!   :Thmbsup: :Thmbsup: :Thmbsup: :Thmbsup: :Thmbsup: :Thmbsup:



ps.
Brad - thanks for that link, Actual Windows Manage looks quite useful, i may give that a try also.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) Here's a very late entry! I stumbled across the solution while browsing for another project.

NoClose - Disable the Close button (X) of selected windows.

Features:
- Press Ctrl+1 to Enable or Disable the Close button of the active window.
- Press Ctrl+2 to Add a rule.
- Automatic enabling and disabling of close buttons on program start and stop, and on window creation.
- Change hotkeys and automation options.



You'll find the downloads and more info at 1 Hour Software by Skrommel.

Skrommel
« Last Edit: April 08, 2006, 10:48 PM by skrommel »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
skrommel - amazing!

beautiful about box too by the way!

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :tellme: Please make shure you've got the latest upload, there was a typo in the first one!

Skrommel

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
while you're tweaking it, may i suggest that the menu actually says "About NoClose.."
rather than just "NoClose", which is not clear what it will do.
(same idea would hold for any other app of course).

wreckedcarzz

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,626
    • View Profile
    • Donate to Member
Re: DONE: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #19 on: November 08, 2006, 06:08 PM »
New suggestion...
also after Ctrl+1 is pressed, the Alt+F4 combo is disabled for that app...I go insane after I do that - one window too many can be very, very bad for me.

wesnwilma

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
I am trying to use NoClose on a Win7-64 machine but have problems with the rules. The instructions say that the requirements are part of the a window title and/or the ahk_class name (either part is optional). I am having to enter the full title AND the ahk_class or it will not work. My problem is I have some program windows where the class changes each time they open so I cannot use the rules.

Am I missing something?

~Wes

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: DONE: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #21 on: December 22, 2014, 02:29 AM »
Hi, Wes, and a very belated welcome to the DonationCoder site.   :-[

Am I missing something?

No, you weren't missing anything.  I'm not the author of the NoClose but, due to another thread regarding the same issue, I looked over the code, found the bug, and fixed it.  So, if you're still around, please feel free to try:  http://skwire.dcmemb...ommel/NoCloseMod.zip

wesnwilma

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: DONE: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #22 on: December 25, 2014, 10:46 AM »
Hi,
I had forgotten about this post and was just using the keyboard shortcut. Thanks for the update. It works great now.
~Wes

Filipe Meira Castro

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 104
    • View Profile
    • Donate to Member
Re: DONE: "Stop Me From Closing It" - prevent easy closing of a program
« Reply #23 on: January 30, 2020, 04:04 PM »
This NoClose from skrommel is quite nice.

Is it possible to the opposite?

If some application has the Close button disabled, to put it enable?