LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strategy to hide/minimize, restore windows

Hi:

I have a situation where, when I minimize one certain LabVIEW VI window, all open LabVIEW VI floating windows need to be hidden or minimized.  And conversely, when one window is 'restored', the others are also restored to their original panel dimensions. Oh yeah, and that one certain window always has to stay bottommost or in back of the other LabVIEW VI windows while all the windows are restored.

The strategy I have tried is shown on the attached graphic, at least for the minimize part of the problem. It uses the winutil32.llb VIs for windows management. The minimize fx don't seem to work for me, nor does the hide window fx.  (I allow the user to minimize windows (in VI Properties, Window Appearance).)

Any good suggestions to make this type of strategy work?

Sincerely,

Don


0 Kudos
Message 1 of 27
(5,185 Views)
Hi Don,

this code should help, maybe you need to change the order of the VI array.

Ton

Message Edited by TonP on 11-24-2006 07:44 AM

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 2 of 27
(5,172 Views)
I will give this a shot.  In the meantime, prior to seeing your reply, I realized that the panel bounds comparision to trigger minimization of all open windows was not going to work (and I did not set it up right as it was), so I tried using the activity terminal on the left which gives 'minimized' as one of its choices and therefore should have been perfect for triggering windows minimization of all open windows.  Additionally and most importantly, the VI names are not the same as the window titles so the winutil32 VIs could not find the window ID.  So the attached code provides a good way to do this, except for the fact that I don't think I have licked the problem of always keeping the one window bottommost.  One of the winutil fxs allows you to 'Move Window to Bottom' which could be done at strategic times to possibly accomplish this.  But there seems to be now way to make window always bottommost within the LabVIEW application (whereas there is a VI to make the window always topmost).

What do you think about this code (graphic attached)?  Would seem to be an efficient way to do the job.

Thanks,

Don
0 Kudos
Message 3 of 27
(5,152 Views)
Ok, I took the gist of your idea and implemented it, except I did not need the additional event structure.  In my code, the event structure case 'Panel Resize' is triggered when the background panel window is minimized which then triggers the minimization of the other windows. Also, I only gather the VI refnums for those that have open panels (maybe you meant this but your screenshots appear to want to register all VIs whether front panel is open or not). It seems to work fine.  I never would have known about the front panel invoke node exposing the states, and I like your solution as it requires that I only need one of the winutil32 functions (that for moving window to bottom).

You seem to refer to a link for inserting code screenshots without server hosting?  I will have to look into that as it certainly would make it nice for the readers of the forum.

Thanks again,

Don
0 Kudos
Message 4 of 27
(5,149 Views)
ps. I am still interested to find a way to make a window always bottommost (and only bottommost within the LabVIEW application so that it does not go behind existing open windows from other applications).....Don
0 Kudos
Message 5 of 27
(5,145 Views)
Hi Don,

nice it works!
One thing you don't need the minimized comparison, just feed the ACT into the select case.


You seem to refer to a link for inserting code screenshots without server hosting?  I will have to look into that as it certainly would make it nice for the readers of the forum.

My signature refers to a tool you insert in the Labview\project directory, after a restart of LV you get a 'Code Capture' function in the tools menu. RUnning that tool allows you to save (parts) of the FP and BD into a .png or the clipboard, if you have some code selected it will only give back the rectangle of the selected code. The really nice thing it can copy the filename into the clipboard! Then you can easily insert it into your post.
To see the picture inline you need a trick:
  • Add the picture as an attachment
  • Submit the post
  • edit the post
  • insert a picture link to the attachment Smiley Very Happy
et voila!

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!
0 Kudos
Message 6 of 27
(5,128 Views)
Good point on the ACT terminal.  Perhaps then a more compact form of the code overall looks like the attached.

I will look into the tool.  When I go to the 'options' on one of my messages, I do not see 'Edit' as one of them.  How do you edit a post?

Sincerely,

Don
0 Kudos
Message 7 of 27
(5,120 Views)


@DonRoth wrote:
I will look into the tool.  When I go to the 'options' on one of my messages, I do not see 'Edit' as one of them.  How do you edit a post?



Be fast (under 10 minutes or so), it appears as the top 'option'
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!
0 Kudos
Message 8 of 27
(5,114 Views)

Try Windows API Function Utilities (32-bit) for LabVIEW at:
 
George Zou
 
George Zou
0 Kudos
Message 9 of 27
(5,110 Views)

Hi George:

I've been using the winutil32 utilitiy window management fxs for years - see my posts on this thread.  They do not include a fx specifically to make a VI window ALWAYS bottommost, only to MOVE a window to the bottom, which you would have to do strategically / repeatedly in order to achieve the effect (they DO include a utility to make a VI ALWAYS topmost).  And even so, I want the window to be always bottommost ONLY WITHIN THE LABVIEW APPLICATION ENVIRONMENT.  I think (though not 100% sure) that the fx to make a VI always topmost puts the windows topmost above all open windows (not just LabVIEW windows).  That is not what I want for a bottommost window - it must do the trick only for the LabVIEW application environment.

 

Sincerely,

 

Don

0 Kudos
Message 10 of 27
(5,079 Views)