LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying a popup message in front of other running programs

Solved!
Go to solution

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!  

0 Kudos
Message 1 of 9
(10,241 Views)

In your popup vi select File>VI Properties>Appearance>Customize>Windows behavior Modal

PaulG.
Retired
0 Kudos
Message 2 of 9
(10,227 Views)

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.

Tim
GHSP
0 Kudos
Message 3 of 9
(10,215 Views)
0 Kudos
Message 4 of 9
(10,207 Views)

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!").

 

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_send.mspx?mfr=tru...

Message 5 of 9
(10,202 Views)

@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. Smiley Tongue

PaulG.
Retired
0 Kudos
Message 6 of 9
(10,197 Views)

Then why did you suggest it? He said that he needed the windows to be in fornt of everything and not just LabVIEW programs.

Tim
GHSP
0 Kudos
Message 7 of 9
(10,192 Views)
Solution
Accepted by topic author sparkysquared

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.

 

 

 

Message 8 of 9
(10,187 Views)

Thanks Matthew. I was able to implement that successfully.

0 Kudos
Message 9 of 9
(10,166 Views)