From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-11-2003 03:45 PM
07-11-2003 03:51 PM
07-11-2003 03:55 PM
07-11-2003 04:43 PM
07-13-2003 05:39 PM
07-14-2003 03:58 AM
05-08-2004 07:17 AM
07-20-2017 04:57 AM
Old thread...but relevant to the MessageBox.vi in question so let me try here:
I often use the MessageBox.vi to get a more native dialog box with icons etc, and the modality is most often set to the default which is "Application". However, the behavior of this seems to have changed on Windows 10, it will no longer stay modal/ on top of the calling VI as it should. Has anyone else noticed and found a fix to this (or a workaround, like a replacement function with the same funtionality (icon etc.)? Using System Modality is not a solution as I do not want to have it disturb anything but the application itself.
07-21-2017 04:30 AM
I figured out a solution to the modality issue on Windows 10.
The problem with the original MessageBox.vi on Windows 10 is that it will only set the modality right if the window handle to the caller is correct, and the way that handle is retrieved does not actually work in built applications.
The way to eliminate the problem is to get the caller's reference like this:
07-21-2017 08:50 AM
Yes the old way of getting the HWND was flawed, and your method is better but this also relies on windows not sharing the same title and a few other small issues. Luckily NI has a couple of methods (one deprecated one private) that will return an HWND given a VI reference. Attached is a better way to get the HWND of a VI reference which I've used in applications with success. Here is a discussion on these methods on LAVA.
https://lavag.org/topic/13803-getting-the-window-handle-for-a-fp-with-no-title-bar/
Something I can't seem to find at the moment is I remember someone using more features of the system dialog box for things like changing the button text, and a few other features...but I can't find it at the moment.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord