LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to achieve 'Panel Resize Event Filter' like function?

Gopalakrishnan P

 

Hi all,

Panel resize filter is not available in Event structure. So if I use the below code, on pressing the maximize button, windows will maximize the front panel and later LabVIEW brings it back to the mentioned size. There will be a flicker during this operation. To avoid this flicker, is it possible to disable windows OS to perform maximize event or to set the default window maximum size in windows or any other way to implement this?

 

The maximize button should not be disabled, but  have to maximize the panel to a specific size without that flicker. What I'm actually trying to do is to use windows messaging queue to capture the maximize event and then implement the same through LabVIEW. Related example is in this link http://zone.ni.com/devzone/cda/epd/p/id/4394 

 

Has anyone tried solving a similar problem by this method?
Also please suggest if there is any other way to achieve this.

 

Gopal

Thanks,
0 Kudos
Message 1 of 10
(3,724 Views)

Hi Gopalakrishnan,

 

The file that you have attached is unable to open. Please upload a zipped folder of the same. This would enable us to help you better.

 

Thanks and regards,

 

Falcon

0 Kudos
Message 2 of 10
(3,699 Views)

Hi,

    I have attached a sample VI. If you run this VI and maximize it, you can see the flicker. I would like to maximize without the flicker on the screen.

 

Thanks,

Gopalakrishnan

0 Kudos
Message 3 of 10
(3,696 Views)

HI KrishGopal,

 

I would suggest you to deploy the VI on a Real Time target and set the thread to time critical priority. This would enable the VI to run independent of the windows OS events.

 

Windows does not allow setting of priorities and parallel processes would always take place one of which is the maximizing event.

 

Since the event structure is by definition based on the occurrence of the event, absence of the filter node would inevitably lead to the flicker.

 

Trust this helps you,

 

Thanks and regards,

Falcon

0 Kudos
Message 4 of 10
(3,670 Views)

Hi Falcon,

 

Thanks Falcon, but I afraid the application will be running on the windows OS. Actually in Visual Basic, it is possible to set the default maximum and minimum size for a window. If you refer to this link below, a VB code is given, which sets the Max and Min size of the Form. http://support.microsoft.com/kb/185733

I wonder if it is possible to implement the same in LabVIEW. If no solution is found, I can go with Panel Resize Notifier Event itself.

 

Thanks,

KrishGopal

0 Kudos
Message 5 of 10
(3,667 Views)

Hi KrishGopal,

 

Please find attached a modified VI that removes the flicker in panel resize activity. I am using Panel Resize Notifier Event and additional logic. There is no flicker when maximize button is used and screen is brought back to original size. Also when mouse is dragged to to resize the panel, it is brought back to original size without a flicker.

 

Please let me know if this addresses your concern.

 

Regards,

Ankur

0 Kudos
Message 6 of 10
(3,636 Views)

Hi Ankur Jain,

 

Thanks for the post. In your code, you make a delay of 150ms and then resize it back to specified size. But what I meant is that the maximize option performed by the OS should be limited to the size specified. That is instead of allowing the OS to maximize it to complete screen and bringing it back to required size, we have to maximize it to the specified size dirtectly.

 

Thanks,

KrishGopal

0 Kudos
Message 7 of 10
(3,629 Views)

Hi Krishgopal,

 

Please try the following method

 

File»VI Properties and choose Window Appearance from

the Category pull-down menu.

 

Click the Customize button and Deselect  the option : Allow user the resize window

 

Attached is a screenshot of the same.

 

Please let me know if this is able to help you out.

 

Regards,

Ankur

 

 

Download All
0 Kudos
Message 8 of 10
(3,607 Views)

Hi Ankur,

 

       Thanks for the post. As I mentioned in the first message, the application should provide the user an option to maximize instead of disabling maximize button. Similar to that you have done for setting a minimum panel size, I'm looking for a way to set maximum panel size, so that when user presses maximize button, the panel should resize. to that specified maximum size.

 

Thanks & Regards,

KrishGopal

0 Kudos
Message 9 of 10
(3,590 Views)

Hi,

 

This is another alternative which you might want to consider. Not exactly similar to what you have in mind, but meets the purpose.

 

Thanks,

 

Joe

 

0 Kudos
Message 10 of 10
(3,547 Views)