From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems when I open a subvi

Hi again,

When I opened a subvi from my vi this subvi doesn't catch focus, I have to minimize it and then maximize and when I maximize it the subvi catchs the focus, why doesn't my subvi catch the focus when I open it for the first time?

The vi is a default window and it is the parent and the subvi is the child and it is a modal window but the problem is not the modal window. I have test It with a default window and It does the same.

What's the problem? Can anyone help me?

Thanks,

ToNi.
0 Kudos
Message 1 of 11
(3,114 Views)
Sounds like a Windows problem to me. BUt just in case, what version of Labview are you using?

Richard
0 Kudos
Message 2 of 11
(3,105 Views)
Hi,

I am using labVIEW 7.0 Express with MS Windows XP SP2.

The window of subvi don't activate. If I minimize and then I maximize, then the window of the my subvi get the focus (it activates).

Thanks,

ToNi.
0 Kudos
Message 3 of 11
(3,096 Views)
Are you talking about development or runtime? Is this a vi or an executable? It sounds to me as though your sub vi front panel does not appear when you click on the run button of your top level vi in the development environment. Is that right? If so, this is normal - none of my sub vi's are displayed. If you want to change this behaviour, then
1. open your sub-vi's front panel
2. right click on the icon in the top right hand corner.
3. Select VI Properties...
4. Click on down arrow next to General and select Window Appearance
5. Select either Dialog (if it has a button to close the sub vi - for example asking for a password) or click on customise
5a. If customise, click on "Show Front Panel whel called" and "Close afterwards if originally closed"

Richard


If you still have problems, please explain click by click what you do
Message 4 of 11
(3,091 Views)
Hi,

I just solve the problem. Before I call my subvi from my vi with invoke method run I put a property node on which one element is state and I set it to 5 (maximized). Then when my subvi opens It has the focus, it is active, all seems ok but..... then if I do it...... there is another problem, my subvi loses his modal behavior. Why?

Thanks,

ToNi.
0 Kudos
Message 5 of 11
(3,088 Views)
It ocurrs in development when I press run button from my vi. Then from my vi, in runtime, I have a menu where I select to show me the subvi. When I select it, my subvi appears maximized but it is not a modal window, and I have put in window appearance that I want it to be modal (I have changed the behavior of my subvi to modal, the vi is default (not modal)). This is a vi not an executable. I do it from development and then I press the run button in order to test it.

Thanks,

ToNi.
0 Kudos
Message 6 of 11
(3,086 Views)
Out of my league now 😞 I just drop a sub VI onto my main VI's block diagram, put it in a case and execute the case when I want the VI to appear. I suspect that by changing the mode to maximize you are removing the modal definition.

If that is the case, then rather than choosing maximize, go to VI Properties... again, but this time choose Window Size and set it to "Size the front panel to the width and height of the entire screen"

Richard
0 Kudos
Message 7 of 11
(3,084 Views)
Hi,

Problem persists. The window of my subvi stay modal but I can't press any button of my subvi. In my subi I have several buttons and I try to press them and it don't work. It is strange, it seems as my subvi doesn't have the focus or is not active but the modal behavior works, I can't do other things and then as I press buttons from my subvi and they don't work..... I am blocked in my subvi.

Thanks,

ToNi.
0 Kudos
Message 8 of 11
(3,082 Views)
Modal by definition stays on top and steals the focus. You can either use lvwutil32.dll (use Google to findit) or Invoke nodes to control your window. I cannot remember how to do it but look at http://forums.ni.com/ni/board/message?board.id=170&message.id=104121#M104121 and my last reply for some clues.

That's all for now

Richard
0 Kudos
Message 9 of 11
(3,079 Views)
Hi,

I have tested the library you told me, lvwutil32.dll, but the problem persists. I don't know what's the problem. The only I want to do is a vi that calls another subvi and I want the subvi is modal and it is active but don't work....

Thanks to everybody for helping me,

I will continue trying to solve it....

ToNi.
0 Kudos
Message 10 of 11
(3,068 Views)