Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11868 > unrolled thread

System Menu Close

Started byJeff Rollo <jrollo64@gmail.com>
First post2018-09-05 04:51 -0700
Last post2018-09-06 07:28 +0200
Articles 9 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  System Menu Close Jeff Rollo <jrollo64@gmail.com> - 2018-09-05 04:51 -0700
    Re: System Menu Close JohnMartens <martens@tennishulp.info> - 2018-09-05 15:58 +0200
      Re: System Menu Close James Martin <james@northwoodlumber.com> - 2018-09-05 10:21 -0400
        Re: System Menu Close Jeff Rollo <jrollo64@gmail.com> - 2018-09-05 22:13 -0700
        Re: System Menu Close JohnMartens <martens@tennishulp.info> - 2018-09-06 07:49 +0200
          Re: System Menu Close Jeff Rollo <jrollo64@gmail.com> - 2018-09-05 23:10 -0700
            Re: System Menu Close JohnMartens <martens@tennishulp.info> - 2018-09-06 08:55 +0200
      Re: System Menu Close Jeff Rollo <jrollo64@gmail.com> - 2018-09-05 22:12 -0700
        Re: System Menu Close JohnMartens <martens@tennishulp.info> - 2018-09-06 07:28 +0200

#11868 — System Menu Close

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-05 04:51 -0700
SubjectSystem Menu Close
Message-ID<44dbde38-618a-489e-b446-90639bb9c4fb@googlegroups.com>
Hi. I used to use a function called SystemMenuClose to stop users hitting the X top right of windows to stop users closing the window incorrectly. 

I cannot now work out how I achieved it.

Does anyone have any ideas pleased?

[toc] | [next] | [standalone]


#11869

FromJohnMartens <martens@tennishulp.info>
Date2018-09-05 15:58 +0200
Message-ID<pmondi$u8p$1@dont-email.me>
In reply to#11868
Was it something like this ?

METHOD QueryClose() CLASS frmMyWindow
RETURN SELF:lMyWindowCanBeClosed

When setting SELF:lMyWindowCanBeClosed to TRUE when it is closed in the 
right way

John


Op 5-9-2018 om 13:51 schreef Jeff Rollo:
> Hi. I used to use a function called SystemMenuClose to stop users hitting the X top right of windows to stop users closing the window incorrectly.
> 
> I cannot now work out how I achieved it.
> 
> Does anyone have any ideas pleased?
> 

[toc] | [prev] | [next] | [standalone]


#11870

FromJames Martin <james@northwoodlumber.com>
Date2018-09-05 10:21 -0400
Message-ID<pmoool$88m$1@dont-email.me>
In reply to#11869
Here is what I do:

LOCAL hSysMenu
	
	hSysMenu := GetSystemMenu(SELF:Handle(0),FALSE)
	RemoveMenu(hSysMenu, SC_CLOSE, WM_SYSCOMMAND)

James

On 09/05/2018 09:58 AM, JohnMartens wrote:
> Was it something like this ?
> 
> METHOD QueryClose() CLASS frmMyWindow
> RETURN SELF:lMyWindowCanBeClosed
> 
> When setting SELF:lMyWindowCanBeClosed to TRUE when it is closed in the 
> right way
> 
> John
> 
> 
> Op 5-9-2018 om 13:51 schreef Jeff Rollo:
>> Hi. I used to use a function called SystemMenuClose to stop users 
>> hitting the X top right of windows to stop users closing the window 
>> incorrectly.
>>
>> I cannot now work out how I achieved it.
>>
>> Does anyone have any ideas pleased?
>>

[toc] | [prev] | [next] | [standalone]


#11872

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-05 22:13 -0700
Message-ID<44b8799b-2fb9-4831-ba85-6c8d66545efd@googlegroups.com>
In reply to#11870
Hi James, thanks for your idea also, again, I couldn't get it to work. I assume I create a function or method with your code?

[toc] | [prev] | [next] | [standalone]


#11874

FromJohnMartens <martens@tennishulp.info>
Date2018-09-06 07:49 +0200
Message-ID<pmqf5t$kg9$1@dont-email.me>
In reply to#11870
Does this help in the PostInit of the window
SELF:EnableSystemMenu(FALSE)


Op 5-9-2018 om 16:21 schreef James Martin:
> Here is what I do:
> 
> LOCAL hSysMenu
> 
>      hSysMenu := GetSystemMenu(SELF:Handle(0),FALSE)
>      RemoveMenu(hSysMenu, SC_CLOSE, WM_SYSCOMMAND)
> 
> James
> 
> On 09/05/2018 09:58 AM, JohnMartens wrote:
>> Was it something like this ?
>>
>> METHOD QueryClose() CLASS frmMyWindow
>> RETURN SELF:lMyWindowCanBeClosed
>>
>> When setting SELF:lMyWindowCanBeClosed to TRUE when it is closed in 
>> the right way
>>
>> John
>>
>>
>> Op 5-9-2018 om 13:51 schreef Jeff Rollo:
>>> Hi. I used to use a function called SystemMenuClose to stop users 
>>> hitting the X top right of windows to stop users closing the window 
>>> incorrectly.
>>>
>>> I cannot now work out how I achieved it.
>>>
>>> Does anyone have any ideas pleased?
>>>

[toc] | [prev] | [next] | [standalone]


#11875

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-05 23:10 -0700
Message-ID<b365959d-114f-40cd-a916-262614a36238@googlegroups.com>
In reply to#11874
Brilliant! Thank you very much for your help John. Greatly appreciated. That did the trick beautifully.

[toc] | [prev] | [next] | [standalone]


#11876

FromJohnMartens <martens@tennishulp.info>
Date2018-09-06 08:55 +0200
Message-ID<pmqj1g$85d$1@dont-email.me>
In reply to#11875
Glad to hear !!

Op 6-9-2018 om 08:10 schreef Jeff Rollo:
> Brilliant! Thank you very much for your help John. Greatly appreciated. That did the trick beautifully.
> 

[toc] | [prev] | [next] | [standalone]


#11871

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-05 22:12 -0700
Message-ID<44fa5299-ed4c-4acd-b397-a92d5fef7c29@googlegroups.com>
In reply to#11869
Hi John, really can't recall - it was almost 20 years ago! I tried your solution, yet could not get it to work? Could I have done something wrong?

[toc] | [prev] | [next] | [standalone]


#11873

FromJohnMartens <martens@tennishulp.info>
Date2018-09-06 07:28 +0200
Message-ID<pmqdue$f6i$1@dont-email.me>
In reply to#11871
What doesn't work ?

Does the window not close al all or is it always cloced ?

John


Op 6-9-2018 om 07:12 schreef Jeff Rollo:
> Hi John, really can't recall - it was almost 20 years ago! I tried your solution, yet could not get it to work? Could I have done something wrong?
> 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web