LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET messagebox very slow

Solved!
Go to solution

I'm using a .NET messagebox object and it loads very slow. I wait 30 seconds before it pop-up? Does LV need to load the full framework in memory before running any .NET code?

0 Kudos
Message 1 of 12
(4,048 Views)

There is no such thing as loading the full framework into memory. Please post the code. Also indicate which version of .NET you are trying to use.

0 Kudos
Message 2 of 12
(4,034 Views)

🙂 That's nice to hear. The code is just a show() invoke node from a messagebox object.

 

The strange thing is the first time it takes 30 seconds to show the messagebox, the times after it's there in a flash??

 

The code is running on an intel atom 2GHz-2Gb RAM with LV DE 2010 installed.

0 Kudos
Message 3 of 12
(4,028 Views)

An Atom? Is this a netbook? Aren't those things notoriously slow? Regardless, which .NET version are you using?

 

I just had a quick check on a LV2010 installation inside a virtual machine, and the MessageBox.Show() came up real quick. Even the first time.

0 Kudos
Message 4 of 12
(4,023 Views)

All-in-one from Assus. It's a slow machine indeed. On my i7 it's very quick as well.

 

The strange thing is that ones it's loaded(it looks like it's loading something or configuring) it behaves normal. Isn't there any optimalisation?

 

I must check the .NET version.

0 Kudos
Message 5 of 12
(4,015 Views)

NI advice to put the assemblies into the project directory. I only find stdole.dll in the .NET folder. I copied this .dll to my project folder and when I open the vi when LV is still not running it seem to behave normal. It only takes a long time for the vi to start. When I remove the .NET it start fast.

 

When LV is already open and I load then the vi, the .NET is still slow. Also in the RT engine it's slow.

0 Kudos
Message 6 of 12
(4,005 Views)
Solution
Accepted by topic author JoVMo

Upgrade to .NET framework 4 was the solution.

0 Kudos
Message 7 of 12
(4,000 Views)

Could you tell me how can you call show() method for a messagebox object, beacuse I can not use MessageBox constructor in LV (No public constructor) 

 

Could you help me? thanks in advance!

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 8 of 12
(3,971 Views)

@Durnek wrote:

Could you tell me how can you call show() method for a messagebox object, beacuse I can not use MessageBox constructor in LV (No public constructor) 

 

Could you help me? thanks in advance!


You should start a new tread for this question.

Tim
GHSP
0 Kudos
Message 9 of 12
(3,967 Views)

show() is just a method that takes a string as argument. http://msdn.microsoft.com/en-us/library/519bytz3.aspx

 

I don't think u need to use a constructor for message box. Just use the invoke functionblock and select the .NET messagebox class. After u select the show() method.

 

0 Kudos
Message 10 of 12
(3,961 Views)