11-13-2015 01:42 PM - edited 11-13-2015 01:45 PM
When I open a sub-VI with window appearence set to be "Modal", a small grey border appears around it. Is there a way to get rid of it?
Solved! Go to Solution.
11-13-2015 02:00 PM
I don't think so. I might be wrong but I think that border is built into the OS and is defined by the theme set. If this is the case (and I'm not certain it is) a low level Windows DLL call can probably remove it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-13-2015 10:06 PM
Can you use Floating instead of Modal?
11-15-2015 12:00 AM
No, I have to use Modal because I want the background to be disabled when the small window pops out.
11-15-2015 11:00 AM
The border is the widnow style of a modal. It's defined by the OS, not LabVIEW. No way to remove it in LabVIEW.
There are many ways to block the background window.
You can minimize it; create a intermediate window to block it; show/hide a button/decor to cover it; etc., etc.
08-24-2016 11:49 AM
08-24-2016 04:18 PM
1. Set the non-modal dialog box Topmost Window
or
2. In the intermediate window, poll FP.IsFrontmost status
or
3. Disable the intermediate window, so that it won't get any click or keyboard input.
08-25-2016 03:31 AM
1. I already did this. But since the dialog box is non-modal, the user can bring the intermediate window to the frontmost by clicking outside of the dialog box.
2. Polling the frontmost status of the intermediate window and programmatically set the dialog box back to frontmost probably would work, but only on fully transparent blocking windows. If you use a semi-transparent black blocking window like me, this would result in some ugly flashing of the blocking window.
3. This sounds like what I am looking for, but yet I haven't found where to disable complete windows, I just know how to disable single front panel controls.
Anyway, I found another solution to my problem (creating an "about" popup window, which uses the same background picture as my splash screen). Since I cannot remove the grey border from the modal window, I added the title bar to the about screen. Similar like Labview: The labview splash screen uses no title bar, but the "About Labview..." popup has the title bar enabled. If NI can live with this, I can do too 🙂
08-25-2016 09:03 AM
I found a solution by using floating together with a Windows API function "Make window always on top" (use that with "get window ref num"). You can download it from here:
http://www.ni.com/example/29935/en/
08-25-2016 09:51 AM
> 1. I already did this. But since the dialog box is non-modal, the user can bring
> the intermediate window to the frontmost by clicking outside of the dialog box.
No you didn't.
Topmost window is another class. They are on top of all normal windows. Including normal windows of other applications. Like a system wide floating window.
It's NOT move to window to top (in Z direction).
Other user already give you link which does this.
Disable a window requires Windows API. Seem you aren't family with it.
Method 1 uses Windows API too, but NI already build them into VIs.
There is another option: child window. A child window always on top of it's parent window.
Also requires Windows API, but already available in VI. Just search this forum for child window.
Method 2 is pure G.