Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/31/2022 in all areas

  1. I don't like VIs to be set to Modal in the VI Properties. I actually have a VI Analyzer test to find these. This is because when the VI reserved to be ran, but the panel is open, it will be modal, but also not running. In this situations aborting gracefully is difficult, and needs either an Abort All VI set to run when opened, or something like my Tray Launcher. Because of this I have very few modal VIs in my code, and instead I will set them to modal using VI server when the VI is running. If I have a VI that I want to be Model when it is running, I will set it with something like a constant of True when calling those panel manipulation VIs. I guess that's a long way to say "For debugging benefits". As for what VIs do I want to be Model? I'd say things that are dialog settings that need to be filled out now. If my user presses Start Test a dialog comes up asking about the details of the test to be ran, and that dialog is Model.
    2 points
  2. I also was a bit frustrated by this some times. So attached is a demo of some panel movement code. It has a few main functions. The first is sometimes I'd have a dialog I wanted to pop up, but I wanted it to be centered on whatever monitor the mouse was on. My thought was that this was the monitor the user was using, and they probably just clicked something, so put it there. I also had times that I would pop up a dialog under the mouse and so I wanted the panel to be centered on the mouse as best it can, but stay on the same monitor. This doesn't always work well with taskbars that can be hidden, and size and position not being consistent but it mostly works. And lastly I sometimes had a need to set a panel to maximize on a specific monitor. We typically would have 2 or 3 set side by side in the system. So this VI can set a panel to maximize on the "Primary", "Left", "Right", "Second from Left" or a few others. As you noticed this won't fix LabVIEW native dialogs, and any solution I can think of for those will be a bit hacky. Panel Movement Center Maximize Demo.zip
    1 point
×
×
  • Create New...

Important Information

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