LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to send a warning message before closing soft via X of the title bar

With labview 8.2:
I would like to send a warning message before closing my soft when the user press the "X" of the title bar. Is it possible to do that without a Windows dll?
 
Thanks a lot,
Daniel.
0 Kudos
Message 1 of 5
(3,624 Views)
Hi Daniel,

use an event structure, select event <Application> -> 'Application Exit'. Now you know when the user wants to close the window and you are able to show a message or discard the event.
You can also forbid window closing in the vi properties -> Window appearance!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(3,617 Views)
Gerd,

I think a filter event for 'Panel close?' is more appropriate because you have the possibility to cancel the event or continue the event.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 5
(3,606 Views)
Hi TonP,

yes, you're right!
I just opened the 'edit events' dialog and clicked through <Application> and <this vi> without moving the scroll bar - so I missedthe 'Panel close' event.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,593 Views)

Look at the Dialog Using Events template, this uses the "Panel Close?" Event slight mods here will achieve what you want.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 5
(3,591 Views)