LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to..

Hi,
Does anyone know if it is possible to have a YES/NO message box in
labview like in VB? and is it possible to open a second window/VI by
pressing a button?


Thanks,
Rob
0 Kudos
Message 1 of 3
(2,444 Views)
Rob wrote:

> Hi,
> Does anyone know if it is possible to have a YES/NO message box in
> labview like in VB? and is it possible to open a second window/VI by
> pressing a button?
>
> Thanks,
> Rob

If you are talking about a dialog box then yes. You can use the 2 button
dialog. Wire a string to to each one with the text of the button.
The defaults are OK and Cancel. You can open another VI with a button
press. There are a couple of ways, the easiest is to create a case structure

and wire the button to it. Drop the VI in the one of the cases. Set the
SubVI to
run when opened and optionally to close afterwards.

Let me know if you need more help
Kevin Kent
0 Kudos
Message 2 of 3
(2,444 Views)
Rob wrote:

> Does anyone know if it is possible to have a YES/NO message box in
> labview like in VB? and is it possible to open a second window/VI by
> pressing a button?

Kevin's suggestion of the built-in 2-button dialog function is the
lowest-overhead, highest-portability solution, which probably makes it the
best one.

However, if you truly need the exact same thing that you get from the VB
environment, then you'll want to make a call to the MessageBoxA function
from the Windows user32.dll library. Without going into the gory details,
the function accepts a "MessageBox Type" argument, and a value of 4
produces the same Yes/No message box that you're using in VB.

Regards,
John Lum
National Instruments
0 Kudos
Message 3 of 3
(2,444 Views)