Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and may be fixed. Will keep monitoring.


devel / comp.lang.xharbour / Prevent user from ending program by right-clicking the icon in the tray

SubjectAuthor
* Prevent user from ending program by right-clicking the icon in the trayScott Coffey
`* Prevent user from ending program by right-clicking the icon indlzc
 `- Prevent user from ending program by right-clicking the icon inMichael Hagl

1
Prevent user from ending program by right-clicking the icon in the tray

<ooaaqgt5fvgp01mqb933d9d6u796e7qras@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10363&group=comp.lang.xharbour#10363

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx07.iad.POSTED!not-for-mail
From: non...@noemail.com.invalid (Scott Coffey)
Newsgroups: comp.lang.xharbour
Subject: Prevent user from ending program by right-clicking the icon in the tray
Organization: .
Message-ID: <ooaaqgt5fvgp01mqb933d9d6u796e7qras@4ax.com>
User-Agent: ForteAgent/7.20.32.1218
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 7
X-Complaints-To: abuse@easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Mon, 29 Nov 2021 14:35:16 -0500
X-Received-Bytes: 1102
 by: Scott Coffey - Mon, 29 Nov 2021 19:35 UTC

I have a POS application where I don't want users to exit the program
by ending it externally. I had already added code to the program to
prevent the "X" from appearing in the top-right corner, but they can
still end the program by right-clicking the tray icon and selecting
"close window". Is there a way to prevent that?
--
Scott at Scott dash(-) Coffey dot net

Re: Prevent user from ending program by right-clicking the icon in the tray

<e3fae2ed-fc95-4883-b0a1-73fe50735468n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10365&group=comp.lang.xharbour#10365

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ad4:5aa4:: with SMTP id u4mr49511712qvg.7.1638284022866;
Tue, 30 Nov 2021 06:53:42 -0800 (PST)
X-Received: by 2002:a05:6214:23ca:: with SMTP id hr10mr37107086qvb.92.1638284022682;
Tue, 30 Nov 2021 06:53:42 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Tue, 30 Nov 2021 06:53:42 -0800 (PST)
In-Reply-To: <ooaaqgt5fvgp01mqb933d9d6u796e7qras@4ax.com>
Injection-Info: google-groups.googlegroups.com; posting-host=68.107.209.13; posting-account=7bF0GwoAAABMFHX6V4fON4-1F6LFJ834
NNTP-Posting-Host: 68.107.209.13
References: <ooaaqgt5fvgp01mqb933d9d6u796e7qras@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e3fae2ed-fc95-4883-b0a1-73fe50735468n@googlegroups.com>
Subject: Re: Prevent user from ending program by right-clicking the icon in
the tray
From: dlz...@cox.net (dlzc)
Injection-Date: Tue, 30 Nov 2021 14:53:42 +0000
Content-Type: text/plain; charset="UTF-8"
 by: dlzc - Tue, 30 Nov 2021 14:53 UTC

Dear Scott Coffey:

On Monday, November 29, 2021 at 12:35:18 PM UTC-7, Scott Coffey wrote:
> I have a POS application where I don't want users to exit the program
> by ending it externally. I had already added code to the program to
> prevent the "X" from appearing in the top-right corner, but they can
> still end the program by right-clicking the tray icon and selecting
> "close window". Is there a way to prevent that?
> --
> Scott at Scott dash(-) Coffey dot net

Might see if this VB code will help?
http://vbnet.mvps.org/index.html?code/forms/killclose.htm

Can probably still kill it from Task Manager...

David A. Smith

Re: Prevent user from ending program by right-clicking the icon in the tray

<18f2bb3e-73f2-4526-842c-90b5151f3435n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10366&group=comp.lang.xharbour#10366

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ac8:5ccf:: with SMTP id s15mr4632254qta.220.1638342554734;
Tue, 30 Nov 2021 23:09:14 -0800 (PST)
X-Received: by 2002:a05:6214:5285:: with SMTP id kj5mr3927305qvb.68.1638342554591;
Tue, 30 Nov 2021 23:09:14 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Tue, 30 Nov 2021 23:09:14 -0800 (PST)
In-Reply-To: <e3fae2ed-fc95-4883-b0a1-73fe50735468n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.151.237.2; posting-account=V7lAIgoAAAC3DUcIU4p9S6DraPJfG7Az
NNTP-Posting-Host: 80.151.237.2
References: <ooaaqgt5fvgp01mqb933d9d6u796e7qras@4ax.com> <e3fae2ed-fc95-4883-b0a1-73fe50735468n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <18f2bb3e-73f2-4526-842c-90b5151f3435n@googlegroups.com>
Subject: Re: Prevent user from ending program by right-clicking the icon in
the tray
From: inf...@hagl.de (Michael Hagl)
Injection-Date: Wed, 01 Dec 2021 07:09:14 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Michael Hagl - Wed, 1 Dec 2021 07:09 UTC

Hi Scott,

try this:

#PRAGMA BEGINDUMP
#include "hbapi.h"
#include "Windows.h"

HB_FUNC( SETCONSOLETITLE )
{ hb_retl( SetConsoleTitle( hb_parc(1) ) );
}

HB_FUNC( FINDWINDOW )
{ hb_retnl( (LONG)FindWindow( NULL, hb_parc(1) ) ) ;
}

HB_FUNC( DELETECLOSEBUTTON )
{ DeleteMenu(GetSystemMenu( (HWND)hb_parnl( 1 ), FALSE),
SC_CLOSE,
MF_BYCOMMAND ) ;
DrawMenuBar( (HWND)hb_parnl( 1 ) );
}

HB_FUNC( ENABLECLOSEBUTTON )
{ DeleteMenu(GetSystemMenu( (HWND)hb_parnl( 1 ), TRUE),
SC_CLOSE,
MF_BYCOMMAND ) ;
DrawMenuBar( (HWND)hb_parnl( 1 ) );
}

HB_FUNC( SETFOREGROUNDWINDOW )
{ hb_retnl( SetForegroundWindow((HWND)hb_parnl( 1 )));
}

HB_FUNC( SENDMAXMESSAGE )
{ HWND hWnd;
BOOL nRtn = 1;

//---get handle to the window
hWnd = GetForegroundWindow();

//---tell the window to maximize iteself. won't be
// true "full-screen" but it's the best we can do
// and does not require any user action.
SendMessage( hWnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0 );

hb_retni( nRtn );
} #PRAGMA ENDDUMP

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor