11-15-2017 12:50 AM
hello
please guide me how can i automatically maximize my project (if project is minimized) after some interval if no one is working on PC.
Thanks in advance.
Thanks,
Asif
Solved! Go to Solution.
11-15-2017 12:59 AM
@Asif138 wrote:
hello
please guide me how can i automatically maximize my project (if project is minimized) after some interval if no one is working on PC.
Thanks in advance.
Thanks,
Asif
Define what you mean about "project". The Front Panel of your main VI? Or something else?
11-15-2017 01:01 AM
my front panel...vi
Thanks,
11-15-2017 01:06 AM
Hi Asif,
use an event structure with a TimeOut event set to your "some interval".
When the TimeOut event is fired you can maximize any window you like to.
Btw. I would be very annoyed when user interfaces change window sizes by their own…
11-15-2017 01:12 AM
Thanks to replay
how it will check that no one is working on PC?
Thanks
11-15-2017 01:29 AM
11-15-2017 02:12 AM
@GerdW wrote:
Hi Asif,
the TimeOut is fired when no other event is present.
"No one is working" means "no user input events"…
I believe this is not this simple. If you only use that LabVIEW Event structure you can capture events belonging to this LabVIEW application. Lets imagine the LV app is minimized in the system taskbar. If a user working with any other Windows program or software, you will not get this info in the LV app.
So we need to register somehow for a mouse movement event globally, so the LabVIEW app would capture ANY mouse event globally in the OS... Or something like that. I have to search, I have no idea how to do it.
Another option to try to use a .NET callback, and capture when the screen saver goes on. Then you just set the required timeout for the screensaver, capture this event from LabVIEW, and maximize front panel when needed...
11-15-2017 02:26 AM
11-15-2017 02:37 AM - edited 11-15-2017 02:53 AM
@GerdW wrote:
Hi,
there are those InputDevice functions you could use to monitor mouse/keyboard inputs…
Yes, but then you need polling. Event registered would be more elegant 🙂
Edit: polling option, OP should modify this code as required:
11-15-2017 03:40 AM
hi GerdW
thanks for replay
in block diagram in can only see that i need to edit "max window" inside case structure.
what should i put inside case structure?
Thanks,