Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I 'll add to the mindtester
post
There is an easier option, subscribe to the OnClosing event
in it, you do all the actions when that button is pressed and you need to cancel the closing itself
It seems so, I don’t remember exactly :)
dig in the direction of user32.dll (I'm tired in the evening .. I won't say anything more intelligible yet)
ps I
'll have to comprehend what win32 api is, the window handle, the attribute [DllImport("USER32.DLL")] .. and a bunch of all sorts of incidental nuances. good luck..
ps I obviously reflected on my old experience))
.. on the words "redefinition" and the cross - remove the window title, redefine the contents of the window menu , remove the cross .. that's what I thought
.. but OnClosing of the main form .. not what I didn’t know, I just always used it for actions before closing the program ..
.. I already managed to figure out a typical scenario - minimizing to the tray, and I had experience with the tray, I just chose the strategy of writing a lightweight agent for the tray, and it was not in my practice to cancel the closing, that is, it didn’t close again ) ))
.. well, make allowance for age )).. I'm 52 .. and already a half )) .. nevertheless - I code, and still, not rarely, for money ;)))
pps nevertheless - colleagues gave the correct answer ... and I will also take it in my piggy bank ... alternative to the "tray-tray agent" - minimized and hidden application, does not require time to reactivate ... depending on the task, this may be the right solution
.. but if you need to save memory , and the main form is light - then a lightweight, autonomous tray agent can be better
thanks to everyone! good luck to all! ))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question