04-09-2025 10:27 AM
Hello all, I am trying to program a dot net marquee-style progress bar in a labview 2021 project. While I can place the progress bar, it doesn't animate in Labview 2021, but it will in 2018. Digging deeply into the internet, I think it is related to a setting/method in dot net called Application.EnableVisualStyles. Of course it could be something else, but this seems to make sense. Has anybody else ever been able to execute that method? I can't find where it is exposed, but dot net documentation says it is part of System.Windows.Forms.
All I want is my progress bar code that works in 2018 to also work in 2021.
Chances are that the vi below will work on your LabVIEW installation. It doesn't on my 2021.
04-09-2025 11:08 AM
Have you tried to force the VI run in UI thread?
From VI property => Execution => Preferred Execution System => user interface.
04-09-2025 11:24 AM
By sheer luck I do have both those versions installed and I can confirm that it works on 2018 but not on the 2021.
I did have no problem finding Application.EnableVisualStyles though.
How did you attempt to reach that? I get it via the following:
If that's what you did, which of those steps can't be done?
Also, I did try running that and it didn't seem to help the progress bar work. Maybe that's part of it but other things also need to happen, or maybe it's just permanently broken due to some sort of internal change in LabVIEW 2021.
04-09-2025 11:42 AM
It works on a coworker's labview 2021. Just mine and yours are broken I guess. Thanks for walking me to the application object. I bounced all around and never found it until you laid it out for me.
04-09-2025 11:44 AM
That did not work.
04-09-2025 12:27 PM
@dudenohair wrote:
It works on a coworker's labview 2021. Just mine and yours are broken I guess. Thanks for walking me to the application object. I bounced all around and never found it until you laid it out for me.
By chance does your co-worker have a "LabVIEW.exe.config" file created for 2021?
Having something like that set up which could be used to change the .NET environment somehow is the main thing I can think of that would differentiate between the same install on 2 different PCs.
The only other thing I can think of is if maybe your co-worker runs unpatched 2021 but you have SP1 f2, or something like that.