Jump to content

Windows Dialog


Recommended Posts

Hi Entropy:

You can use "function->time & dialog->one button dialog/two button dialog/three button dialog",or use the MS's API.

William

Well, the program shouldn't have dialogs, because it's a remote panel application. But sometimes, one pops-up (you can't control all the embedded dialogs, particularly when some VIs come from another programming team, or sometimes caused by Matlab incompabilities). So I need to detect when a dialog launches and close it. And this I have no idea. I can quit LabVIEW, but just close that specific Windows dialog... :nono:

Saludos,

Aitor

Link to comment
Well, the program shouldn't have dialogs, because it's a remote panel application. But sometimes, one pops-up (you can't control all the embedded dialogs, particularly when some VIs come from another programming team, or sometimes caused by Matlab incompabilities). So I need to detect when a dialog launches and close it. And this I have no idea. I can quit LabVIEW, but just close that specific Windows dialog... :nono:

Saludos,

Aitor

It really depends what you want to do. A LabVIEW dialog is quite different from a Windows dialog. With Windows dialogs you could in principle use the Windows API to search for the default control to send a message to it to dismiss it. This wouldn't work for LabVIEW dialogs, since LabVIEW controls are not standard Windows widget controls but fully custom implemented by LabVIEW itself.

The easiest way would be to post a return or esc key press to the keyboard queue. This assumes that the dialog has these keys assigned to its OK and Cancel buttons (almost alsways the case for Windows dialogs, but in LabVIEW dialogs implemented by VIs written by the application developer, this sepcifically has to be assigned by the developer).

If this wouldn't work, you would have to distinguish between Windows dialogs where you would have to enumerate the controls in the dialog and then send a message to the correct control using Windows API functions or a LabVIEW dialog where you would use VI server to do the same.

Rolf Kalbermatter

Link to comment
Well, the program shouldn't have dialogs, because it's a remote panel application. But sometimes, one pops-up (you can't control all the embedded dialogs, particularly when some VIs come from another programming team, or sometimes caused by Matlab incompabilities). So I need to detect when a dialog launches and close it. And this I have no idea. I can quit LabVIEW, but just close that specific Windows dialog... :nono:

Saludos,

Aitor

Hi Aitor:

Hope I got what you means.

Try to use this to control the dialog in your case.Use the "Simple Error Handler.vi" and set the "Type of dialog" to 0("no dialog").This maybe helpful.See the attachment.

Good luck.

William

post-3059-1129686557.jpg?width=400

Link to comment
The easiest way would be to post a return or esc key press to the keyboard queue.

Thanks, sir. That's a good and simple idea I didn't think of. :headbang:

Try to use this to control the dialog in your case.Use the "Simple Error Handler.vi" and set the "Type of dialog" to 0("no dialog").This maybe helpful.See the attachment.

Yes, but then I would need all the VIs follow this protocol. Something out of my hand here.

Thanks, people

Aitor

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.