• Choose close windopw or not

    From scbs29@scbs29@fred.talktalk.net to alt.comp.os.windows-11 on Mon Oct 12 10:31:01 2026
    From Newsgroup: alt.comp.os.windows-11

    Hello all
    Is there any way af marking a window so that I have to confirm closing it.
    I have a post-it notes type window permanently open on my desktop with details of
    hospital appointments etc. Unfortunately I keep accidentally closing the window,
    when all the information disappears. Is there any way that I could set up the window so I am
    asked for confiration when I press the close button ?
    --
    remove fred before emailing
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Daniel70@daniel47@nomail.afraid.org to alt.comp.os.windows-11 on Mon Oct 12 20:55:35 2026
    From Newsgroup: alt.comp.os.windows-11

    On 12/10/2026 8:31 pm, scbs29 wrote:
    Hello all Is there any way af marking a window so that I have to
    confirm closing it. I have a post-it notes type window permanently
    open on my desktop with details of hospital appointments etc.
    Unfortunately I keep accidentally closing the window, when all the information disappears. Is there any way that I could set up the
    window so I am asked for confiration when I press the close button ?

    I jot down that sort of stuff in an instance of Notepad (called
    "Stuff"). If I accidently try to close it, Windows brings up a "Are You Sure??" type window.
    --
    Daniel70
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Paul@nospam@needed.invalid to alt.comp.os.windows-11 on Mon Oct 12 10:57:58 2026
    From Newsgroup: alt.comp.os.windows-11

    On Mon, 10/12/2026 5:31 AM, scbs29 wrote:
    Hello all
    Is there any way af marking a window so that I have to confirm closing it.
    I have a post-it notes type window permanently open on my desktop with details of
    hospital appointments etc. Unfortunately I keep accidentally closing the window,
    when all the information disappears. Is there any way that I could set up the window so I am
    asked for confiration when I press the close button ?


    Well, it appears after my Repair Install was needed, my Copilot session
    was ruined. It's no longer in Harmony Format.

    ************************** CoPilot Question *********************************

    Is there any way to run a win32 program on Windows 11, without the traditional decorations
    in the upper right corner ? This would be a capability the user could command, in the interest of preventing the window from being dismissed by accident. Operations from the taskbar (iconify, un-iconify, quit) would not be impeded.

    ************************* CoPilot Answer *****************************

    Yes, but not in a general user-controlled way built into Windows.

    For a classic Win32 application, the minimize, maximize, and close buttons are part
    of the window's non-client area. Whether they appear is ultimately determined by
    the application itself through its window styles:

    WS_SYSMENU controls the system menu and close button.
    WS_MINIMIZEBOX controls the minimize button.
    WS_MAXIMIZEBOX controls the maximize button.
    Other styles control the title bar and frame.

    An application can create a window that has no Close button, or even no title bar
    at all. Many kiosk-style and media applications do this.

    However, Windows 11 does not provide a general "lock the Close button"
    option that a user can apply arbitrarily to any Win32 program.

    There are a few possibilities:

    1. Third-party window-style utilities

    Tools such as AutoHotkey scripts, WinSetZ, Window Manager, or other window-tweaking
    utilities can modify window styles after a program starts. For example, an AutoHotkey script can remove the Close button from a specific window while leaving the program running.

    Example concept:

    WinSet, Style, -0x80000, A

    or other style manipulations against the target window.

    The effectiveness depends on how the application is written. Some programs recreate
    their windows or restore the styles.

    2. Group Policy or application settings

    Certain programs offer their own "confirm before exit" or "minimize to tray" options. Those are application-specific.

    3. Intercept the close request

    An AutoHotkey script can intercept clicks on the Close button and ignore them, or display a confirmation dialog instead. This is often more practical than removing the button entirely.

    4. Custom shell or kiosk mode

    Windows Assigned Access (kiosk mode) can lock down what users can launch or close, but this is intended for dedicated systems rather than normal desktop use.

    Why Windows doesn't generally offer this

    The Close button is considered part of the application's user interface contract.
    Windows assumes that if a program exposes a top-level window, the user is allowed to close it. The operating system therefore leaves control of those buttons primarily to the application developer.

    If your goal is specifically to prevent accidental dismissal while still allowing:

    launching from the taskbar,
    minimizing/restoring,
    and exiting through a deliberate action,

    then a small AutoHotkey script that removes or disables only the Close button for selected applications is probably the cleanest solution. It can affect programs individually without altering Windows globally.

    ************************* End: CoPilot Answer *****************************

    Paul
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Paul@nospam@needed.invalid to alt.comp.os.windows-11 on Mon Oct 12 16:07:10 2026
    From Newsgroup: alt.comp.os.windows-11

    On Mon, 10/12/2026 5:31 AM, scbs29 wrote:
    Hello all
    Is there any way af marking a window so that I have to confirm closing it.
    I have a post-it notes type window permanently open on my desktop with details of
    hospital appointments etc. Unfortunately I keep accidentally closing the window,
    when all the information disappears. Is there any way that I could set up the window so I am
    asked for confirmation when I press the close button ?


    I was going to add to the previous post, you could get the
    LLM-AI to write a PostIt note for you. And that it would be
    "easy". Well, it wasn't easy. The LLM-AI wrote the program
    in about two seconds. But it would not link under MinGW32.
    GUI programs use WinMain() while console programs use Main(),
    and MinGW32 doesn't seem to support WinMain().

    I had to compile it under visual studio. This uses the J: partition
    for storage. For these kinds of projects, I don't bother with the IDE.

    cl appointment.c user32.lib gdi32.lib /FoJ:\TEMP\ /FeJ:\appointment.exe

    One problem with the program, is it was about "half feature complete".
    The TaskBar aspect is not working properly. I cannot Minimize and
    Maximize the program from the Task Bar. If I select the top entry
    in the TaskBar entry, it makes *another* instance of the program,
    instead of iconifying the current instance. This is hardly good
    news, as the program has no "X" in the corner now, and it's like
    dealing with the Sorcerers Apprentice :-)

    Purely for the comedy value, here is a PostIt Note written by an LLM-AI.
    Just to demonstrate what no decorations looks like. It still has
    some sort of Title Bar, as you can grab it by the Title Bar and move it.
    It's just the Title Bar has no line, delimiting the title bar extent.

    [Picture]

    https://imgur.com/a/anM5Ho4

    https://postimg.cc/jw1bQ7cS
    https://i.postimg.cc/L598SkZL/appointment-exe-demo.gif

    Things it does do:

    1) No decorations on upper right.
    2) Is resizable, via at least the lower right corner.
    3) Responds to the View Desktop icon to the extreme right of the TaskBar.
    4) If you left-click in the middle of the pane, it re-reads "appointments.txt"
    from the current profile Downloads folder. You edit your "appointments.txt"
    with Notepad, and then they appear over in the PostIT when you click to update.

    Things it does not do:

    5) TaskBar cannot minimize it or maximize it. Don't know why.
    6) If you click the "appointment.exe" entry in the top of its
    TaskBar entry, it causes a *second* instance of the program to appear :-)
    Which does not damage anything, but is "unsightly". You know,
    like an amateur programmer wrote it.

    Some offsets and font sizes likely need to be adjusted.

    Paul
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From knuttle@keith_nuttle@yahoo.com to alt.comp.os.windows-11 on Mon Oct 12 17:52:51 2026
    From Newsgroup: alt.comp.os.windows-11

    On 10/12/2026 4:07 PM, Paul wrote:
    On Mon, 10/12/2026 5:31 AM, scbs29 wrote:
    Hello all
    Is there any way af marking a window so that I have to confirm closing it. >> I have a post-it notes type window permanently open on my desktop with details of
    hospital appointments etc. Unfortunately I keep accidentally closing the window,
    when all the information disappears. Is there any way that I could set up the window so I am
    asked for confirmation when I press the close button ?


    I was going to add to the previous post, you could get the
    LLM-AI to write a PostIt note for you. And that it would be
    "easy". Well, it wasn't easy. The LLM-AI wrote the program
    in about two seconds. But it would not link under MinGW32.
    GUI programs use WinMain() while console programs use Main(),
    and MinGW32 doesn't seem to support WinMain().

    I had to compile it under visual studio. This uses the J: partition
    for storage. For these kinds of projects, I don't bother with the IDE.

    cl appointment.c user32.lib gdi32.lib /FoJ:\TEMP\ /FeJ:\appointment.exe

    One problem with the program, is it was about "half feature complete".
    The TaskBar aspect is not working properly. I cannot Minimize and
    Maximize the program from the Task Bar. If I select the top entry
    in the TaskBar entry, it makes *another* instance of the program,
    instead of iconifying the current instance. This is hardly good
    news, as the program has no "X" in the corner now, and it's like
    dealing with the Sorcerers Apprentice :-)

    Purely for the comedy value, here is a PostIt Note written by an LLM-AI.
    Just to demonstrate what no decorations looks like. It still has
    some sort of Title Bar, as you can grab it by the Title Bar and move it.
    It's just the Title Bar has no line, delimiting the title bar extent.

    [Picture]

    https://imgur.com/a/anM5Ho4

    https://postimg.cc/jw1bQ7cS
    https://i.postimg.cc/L598SkZL/appointment-exe-demo.gif

    Things it does do:

    1) No decorations on upper right.
    2) Is resizable, via at least the lower right corner.
    3) Responds to the View Desktop icon to the extreme right of the TaskBar.
    4) If you left-click in the middle of the pane, it re-reads "appointments.txt"
    from the current profile Downloads folder. You edit your "appointments.txt"
    with Notepad, and then they appear over in the PostIT when you click to update.

    Things it does not do:

    5) TaskBar cannot minimize it or maximize it. Don't know why.
    6) If you click the "appointment.exe" entry in the top of its
    TaskBar entry, it causes a *second* instance of the program to appear :-)
    Which does not damage anything, but is "unsightly". You know,
    like an amateur programmer wrote it.

    Some offsets and font sizes likely need to be adjusted.

    Paul
    For a similar purpose, I use the standard Windows Notepad. It warns you
    of when you are closing Windows with out saving the note. A frequent
    use of Cntrl S, saves the note.

    The notepad can be placed on the Desktop, or a shortcut to the specific notepad in a different location also works. If you want the Icon can be placed on the tool bar. I have all of my frequently used program
    pinned to the taskbar.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Carlos E.R.@robin_listas@es.invalid to alt.comp.os.windows-11 on Tue Oct 13 13:25:54 2026
    From Newsgroup: alt.comp.os.windows-11

    On 2026-10-12 11:31, scbs29 wrote:
    Hello all
    Is there any way af marking a window so that I have to confirm closing it.
    I have a post-it notes type window permanently open on my desktop with details of
    hospital appointments etc. Unfortunately I keep accidentally closing the window,
    when all the information disappears. Is there any way that I could set up the window so I am
    asked for confiration when I press the close button ?


    Surely there are note taking software for Windows that save the notes automatically or ask before closing. Some use the cloud.

    I use Gnote in Linux.

    You could start here:

    <https://en.wikipedia.org/wiki/Comparison_of_note-taking_software>


    <https://zapier.com/blog/best-note-taking-apps/>
    The 7 best note-taking apps in 2026
    --
    Cheers, Carlos.
    ES🇪🇸, EU🇪🇺;
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From JJ@jj4public@gmail.com to alt.comp.os.windows-11 on Wed Oct 14 13:22:40 2026
    From Newsgroup: alt.comp.os.windows-11

    On Mon, 12 Oct 2026 10:31:01 +0100, scbs29 wrote:
    Hello all
    Is there any way af marking a window so that I have to confirm closing it.
    I have a post-it notes type window permanently open on my desktop with details of
    hospital appointments etc. Unfortunately I keep accidentally closing the window,
    when all the information disappears. Is there any way that I could set up the window so I am
    asked for confiration when I press the close button ?

    With custom made AutoHotkey script, the standard "X" close buttons of a application window, can be hidden to avoid accidental window close via mouse click.

    But to hide the "X" close button, it requires changing the window's System
    Menu property which if disabled, will hide the Minimize, Maximize, "X" close buttons as well as the application window icon, and disable the window's
    system menu (accessible via ALT+SPACE keyboard shortcut or by right-clicking the window title bar).

    One thing to note is that, it may not or may likely not work on custom
    skinned application windows like WinAmp, since they bypass Windows API
    standard window properties, and aren't guaranteed to respect Windows API standard window properties.
    --- Synchronet 3.21d-Linux NewsLink 1.2