LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing window size

Solved!
Go to solution

Norbert,

Ok, I understood about Windows SDK. I was just not sure how to use that in LV.Thanks for the clarification.

But if you have opened that file which I sent, I have already implemented the VI Server. I have LV 8.6.

 

And ok, I understood now what you meant in redundancy. I didn't know we can make two GUIs for the same VI. I thought it was two different VI's with identical block diagram but different arrangements in front panel. That link is good, but I couldn't find about creating two user interfaces in their presentation.

 Can you give me some idea please? 

Vaibhav
0 Kudos
Message 21 of 34
(2,273 Views)

Bill,

Ok, I understood your point perfectly. And the previous comment also seems pretty clear looking at the point you were referring.

 

Actually I didn't get the idea because you have addressed a different issue than the one I am facing, so I was confused.

 

My problem is not spatial. I mean, I am not fighting with the space in order to adjust all my controls in the screen. In fact, I am already using the tab control, and the controls (controls and indicators) are arranged/categorized by different "states" or "phases" of the program execution (another way to categorize controls, apart from those you've mentioned).

 

My problem is - in the last page of the tab control, I have video output indicator. And that has to be in the full screen to give a good user experience. If a user does Maximize-Restore acts, the controls would get misplaced after several attempts of changing window size. So I am not interested in allowing the user to change window size. Instead, I would programmatically (by properties) make the window maximized, and am designing the user interface in a way that the controls look perfect with the maximized window.

Now, the problem with this approach is that there are two different monitor resolutions - 1280x800 (for eg. laptops) and 1280x1024 (normal PC screens) and if I arrange my interface according to the laptop type screens, and if a user runs the application on desktop screen, the video control would not be in the entire screen and the bottom 224 pixels belt would be without video, which will ruin the whole effect. On the other hand if I make an interface for desktop screen, it would not fit in the laptop screens and something will be cut.

 

So we were discussing to make two different user interfaces, and determine the user's screen resolution at run-time before the actual program begins, and then according to that load a corresponding VI.

 

For this, Norbert was explaining me the ways and problems. And in my post on friday, I have uploaded my version of implementing this approach, in which there is a redundancy of code. And Norbert said about not making two VIs but just two front panels (if I now understood well). And now I have to see how can I do that.

 

But even this approach has another problem, apart from code maintainance (if redundancy) and memory usage (if too many references, due to two user interfaces). And this problem is basic - what if the user has a third type of monitor - with lower resolution than these two, or higher, whatever. The application won't run anything, because it doesn't identify the resolution it is looking for.

 

So, now I am thinking to make the program with a low resolution, and in the run time, if the user "wants" a full screen video, he may click a button and change the window to maximized. And my tab control is with "fit control to pane" option selected. So it will be maximized to fit the full screen and the video control will be "Scale control to pane" to be of the same size of the tab control.

But, I am not sure if the image indicator also has such property which can be handled by VI server property node.

 

There are several threads in the forums for this issue. I am participating in a few of them.

 

Would appreciate any inputs from anybody, in the issue...

 

 

PS: On a side note, I would say I also believe in the same approach/attitude, that if someone who really wants to learn something, but doesn't learn from my explanation, then it's my fault as a teacher. 🙂

 

Message Edited by Vaibhav on 08-24-2009 06:29 PM
Vaibhav
0 Kudos
Message 22 of 34
(2,270 Views)

Vaibha:

 

Ugh, sorry I misunderstood what your problem was and for cluttering up the thread because of it.  Let me re-read the thread to see where I went astray.  🙂

 

Bill

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 23 of 34
(2,261 Views)

That's fine Bill.

 

Also, I guess I have summarized the thread in my post. If you understood that, I think you can understand the issue.

 

 

Vaibhav
0 Kudos
Message 24 of 34
(2,255 Views)

Vaibhav wrote:
[...] I have video output indicator. And that has to be in the full screen to give a good user experience.[...]

 

Well, it seems to me that, if it should be full scree, the video could also be a popup panel with only the video indicator. Set the panel to full screen at runtime (VI settings) in order to prevent wrong usage by the user.

Is this a possible approach?

If you have doubt that certain screen resolutions will work out, then you can check for the resolution in you launcher and select the appropriate UI VI to launch. If the resolution of the monitor is none  of the expected one, either stop execution (notify the user why like e.g. "Screenresolution not supported. Supported resolutions are: [...]") or notify the user that due to resolution settings the display can mess up and proceed using the UI which comes closest to the settings.....

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 25 of 34
(2,241 Views)

Vaibhav,

 

After reading your most recent post, I was thinking of the same approach Norbert suggested, so I am endorsing his idea.

 

Lynn 

0 Kudos
Message 26 of 34
(2,240 Views)
I'm not really part of this thread, but I wasn't aware of the "ctr + I" function. It helped me set my VI so that the dialogue pop-ups for my VI come to the front instead of staying in the background by setting the priority. Thanks for the help!
0 Kudos
Message 27 of 34
(2,233 Views)

Norbert and johnsold,

One thing is, yes, I thought about that approach. But, is it possible to make a popup panel of just one indicator?

and second thing is, when the user sees full screen video, he also has to see the controls, so that approach is not good in case of full screen, but I still need to implement this popup panel, because in future there will be more videos, which will have to be floating.

Can you show me how to do that? --- (1)

 

About the second point, for identification and selection of resolution, in my previous post addressing you, I asked how to do that gui-only VI. In that page which you shared, I don't see this trick in the presentation. Can you please explain me? --- (2)

 

Also, from the two approaches that you have suggested, I have implemented the first one and shared in this thread with AlternateGUI.zip, but I don't like that approach. Because if I have to give a presentation, to some client, it would be very unprofessional if my whole program doesn't work just because of

the monitor size. and in the second approach, to find a "closer" resolution, I think it would be a lot of work, and still no guarantee of a good resolution. do you have some good trick to identify the closer resolution? --- (3)

 

I also thought about making front panel full screen in the run time, (when the user sees that Video page), but that is not a good idea again, for the reasons you already mentioned in this thread - mutiple resizes would make things ugly. And there will be multiple resizes, if I make a full screen using vi reference properties, bcause when the user goes back to previous page, the screen will be restored and so on. 

 

For now, I think the best way is to make the front panel suitable for low resolution, and build the application. And the window state maximized by default (or programmatically when the application starts). so when the program runs on a high resolution, it will only expand the front panel objects, and not shrink.

 

The culprit, I thought, might be the tab control, but in forums I read that it's not the culprit.

Because of this issue, I would make a compromise with the objects location. they could be all in the top-left corner of the front panel. so when the tab expands in a bigger screen, only the video indicator expands in the new area, and the other objects remain in the same location. Not so beautiful, but at least not "bad" either.

The decorations expand too, with the tab controls. how to stop them? There is no property for decorations.

 

I hope things are clear in my message.

 

Thanks for your support!

 

Vaibhav
0 Kudos
Message 28 of 34
(2,223 Views)

Vaibhav,

 

(0) Yes, a popup panel is infact a simple VI. So why should there be more than a single indicator if it is not necessary?

(1) This would result in a maximized popup with several controls. The video control would be the largest one and possibly the only one to resize (Scale Object with Pane). The popup could be modal (no change to other window of application possible) or floating. These settings are available in the VI settings.

(2) Showing a GUI-only VI makes no sense at this point. But here is the idea: Think of your application more of a DLL than a set of VIs. Using a DLL, you will have an architecture like User Interface Event Handler which calls the appropriate function for the given UI interaction. Now transfer this to LV: The UI will call different VIs either using static subvis (introduced a little redundancy) or VI server (possibly eliminates all redundancies).

(3) No, there is no real garantee for a "good" resolution except you force the user to switch to one which is directly supported by your application. Another approach would be a design for a non-full screen application but prohibit a resize of the panel. So you'd choose the panel which comes closest to the current resolution, but does not exceed it.

(4) You can pick decoratios using VI Server. Please see attached screenshot:

DecorationsVIServer.PNG

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 29 of 34
(2,204 Views)

Norbert B wrote:

Vaibhav,

 

(0) Yes, a popup panel is infact a simple VI. So why should there be more than a single indicator if it is not necessary?

Well, the requirements are like that. I have started a separate thread for another issue in the same application. Can you please take a look at the GUI template there? You'll have a lot of idea about what I need, in brief.

 

(1) This would result in a maximized popup with several controls. The video control would be the largest one and possibly the only one to resize (Scale Object with Pane). The popup could be modal (no change to other window of application possible) or floating. These settings are available in the VI settings.

Ah ok, so that "floating" window behaviour is what makes a popup panel? so actually i am calling another SubVI or VI, right?

 

(2) Showing a GUI-only VI makes no sense at this point. But here is the idea: Think of your application more of a DLL than a set of VIs. Using a DLL, you will have an architecture like User Interface Event Handler which calls the appropriate function for the given UI interaction. Now transfer this to LV: The UI will call different VIs either using static subvis (introduced a little redundancy) or VI server (possibly eliminates all redundancies).

So this sounds to me like single UI for multiple VIs rather than multiple UI for a single VI. Sorry, can you give me an example or some kind of screen shot please? 

 

(3) No, there is no real garantee for a "good" resolution except you force the user to switch to one which is directly supported by your application.

Yes, that's what I had discussed with my professor, but I am trying to make it more flexible rather than rigid. But due to the "unusual" requirement in the "user interface" it could be this rigid too. 

Another approach would be a design for a non-full screen application but prohibit a resize of the panel. So you'd choose the panel which comes closest to the current resolution, but does not exceed it.

Yes, that's what I am thinking to do for now, but at the cost of the "desired" user interface which demands the full screen. I would really suggest you to take a look at the above mentioned thread, in which I am talking about producer-consumer vs state machine implementation, but i have given a rough template of my application. It'll give you clearer idea about what I am trying to do.

May be you'd come up with a different suggestion.

 

(4) You can pick decoratios using VI Server. Please see attached screenshot:

DecorationsVIServer.PNG

 

ahaa, yes, I had overlooked this option. but does it give resize-proof decorations? You mean, to create/destroy them at the run time. huh?

 

hope this helps,

Norbert 


Thanks a lot for this discussion. Looking forward to see your replies.

Vaibhav
0 Kudos
Message 30 of 34
(2,172 Views)