1 (edited by AD1408 2017-10-14 18:15:58)

Topic: How to disable win form Close (X) button?

Is it possible to disable or hide win form close (x) button, referred as border icons on MVD?


https://s1.postimg.org/6xd0i7gjhb/zzzzz_Temp66.png


If it's not possible, what's the syntax for it so that I can refer to it with sql such as;

SQLExecute('DELETE FROM PI WHERE id='+IntToStr(frmPI.CloseButton.dbGeneralTableId));

I tried CloseButton but it didn't work.

Adam
God... please help me become the person my dog thinks I am.

Re: How to disable win form Close (X) button?

Hi Adam,
You could try setting  BorderIcons / biSystemMenu = false as an object property of the form (although that also hides the minimise and resize icons).
Additionally, you could also hide the file menu options as well (if you're going totally minimalist) with a script but you need to remember to include a button to close the form otherwise you have to kill it from within the task manager!
Please see attached - if you want to show the file menu options, just get rid of the script.
Regards,
Derek.

Post's attachments

Attachment icon adam hide close button.zip 334.84 kb, 368 downloads since 2017-10-14 

3 (edited by AD1408 2017-10-15 08:35:19)

Re: How to disable win form Close (X) button?

Hi Derek,


Thank you very much.......


It'll certainly be useful in different circumstances but in this case disabling just close button needed as minimize and restore buttons will be used.


Hopefully Dmitry will give us the solution.

Adam
God... please help me become the person my dog thinks I am.

Re: How to disable win form Close (X) button?

It's not support.

Dmitry.