LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modal window has a annoying grey border around when running

Solved!
Go to solution

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?

Capture.PNG

0 Kudos
Message 1 of 10
(5,846 Views)

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.

Message 2 of 10
(5,829 Views)

Can you use Floating instead of Modal?

 

 

 

George Zou
0 Kudos
Message 3 of 10
(5,782 Views)

No, I have to use Modal because I want the background to be disabled when the small window pops out.

0 Kudos
Message 4 of 10
(5,745 Views)
Solution
Accepted by topic author Xinghe.W

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.

 

 

George Zou
Message 5 of 10
(5,719 Views)
When using an intermediate window between the main application and a non-modal dialog box, how do you prevent the intermediate window to become frontmost when clicked? I already tried to discard the mouse down? event on the intermediate pane, but this does not prevent the intermediate window to become frontmost (which means the application is deadlocked).
0 Kudos
Message 6 of 10
(5,406 Views)

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.

 

George Zou
0 Kudos
Message 7 of 10
(5,389 Views)

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 🙂 

0 Kudos
Message 8 of 10
(5,377 Views)

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/

 

0 Kudos
Message 9 of 10
(5,359 Views)

> 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.

 

George Zou
0 Kudos
Message 10 of 10
(5,346 Views)