06-20-2011 11:10 AM
Hey all,
I'm new to posting questions so hopefully I've done this correctly. I'm designing a program for use in an academic setting where students have a control panel with a help button they can press if they're stuck on a vi we're building in class. When they press their button, an LED indicator denoting their computer turns red on our control panel and we know they need help. I've added the functionality that I can send messages to individual students, or the entire class, which is handy for making announcements to begin online quizzes or yelling at students for playing games. When I send the messages they are displayed as popups in front of their control panel. However, if the students are running other programs (powerpoint, internet explorer, etc), then they don't see the message until they bring up their help vi again. So, is there a way to make my messages display in front of all running programs? Thanks!
Solved! Go to Solution.
06-20-2011 12:32 PM
In your popup vi select File>VI Properties>Appearance>Customize>Windows behavior Modal
06-20-2011 01:01 PM
That will only put it in front of LabVIEW windows. You will have to access the Windows call in order to do something like that. I will see if I can find that for you.
06-20-2011 01:13 PM - edited 06-20-2011 01:14 PM
06-20-2011 01:18 PM - edited 06-20-2011 01:19 PM
Considered using windows messaging instead of labview? That'll put the Windows GUI in charge, rather than Labview, and the message will pop up on top of any program. Use the concatenate string and system exec.vi to build call that function.
Had a lot of fun playing with netmsg on college LANs. VNC is another real fun toy ("My mouse is moving all by itself!").
06-20-2011 01:22 PM
@aeastet wrote:
That will only put it in front of LabVIEW windows. You will have to access the Windows call in order to do something like that. I will see if I can find that for you.
I knew that.
06-20-2011 01:27 PM
Then why did you suggest it? He said that he needed the windows to be in fornt of everything and not just LabVIEW programs.
06-20-2011 01:43 PM - edited 06-20-2011 01:44 PM
This is a VI which calls the undocumented MessageBoxTimeout function.
It is similar to the MessageBox function (http://msdn.microsoft.com/en-us/library/ms645505%28v=vs.85%29.aspx), but it does include the ability to have the message go away after a certain amount of time (setting timeout to 0 leaves the dialog open indefinitely).
If you set Message Box Modality to MB_SYSTEMMODAL, it will display in front of all applications.
06-20-2011 03:51 PM
Thanks Matthew. I was able to implement that successfully.