08-23-2011 10:09 AM
Gopalakrishnan P
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
08-24-2011 12:03 AM
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
08-24-2011 12:11 AM
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
08-24-2011 04:33 AM
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
08-24-2011 06:35 AM
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
08-25-2011 02:50 AM - edited 08-25-2011 02:54 AM
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
08-25-2011 03:36 AM
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
08-26-2011 03:34 AM
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
08-26-2011 05:20 AM
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
08-30-2011 05:22 AM
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