LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET Progressbar Text

Solved!
Go to solution

i am sorry, my problem is not about how to creat a Progressbar but how to add Text in the middle of the Progressbar.

Thank you for your Webaddress.

If you are interested, you could check the VI, which i have attached right now.

 

Regards.

0 Kudos
Message 11 of 16
(767 Views)

In .NET if you don't create a progressbar, you won't be able to use it. Are you aware of that?

0 Kudos
Message 12 of 16
(762 Views)
Solution
Accepted by topic author AvalanchePD

You can't create a Bush object directly since Brush is an abstract class. Please read the documentation. You need to create an object from one of the derived classes, such as SolidBrush. Also, the CreateGraphics and DrawString needs to be inside the loop. I didn't quite understand what you were trying to do with resetting the color and then setting the fore and back color. This is a redundant operation. See attached modification, which calculates the text location based on the size of the progress bar.

 

Overall I agree with nyc : you are asking how to use .NET controls, not LabVIEW questions.

0 Kudos
Message 13 of 16
(757 Views)

@smercurio_fc wrote:

You can't create a Bush object directly since Brush is an abstract class. Please read the documentation. You need to create an object from one of the derived classes, such as SolidBrush. Also, the CreateGraphics and DrawString needs to be inside the loop. I didn't quite understand what you were trying to do with resetting the color and then setting the fore and back color. This is a redundant operation. See attached modification, which calculates the text location based on the size of the progress bar.

 

Overall I agree with nyc : you are asking how to use .NET controls, not LabVIEW questions.


The OP is trying to use .NET controls in LabVIEW which is made easier if he knows how to do it in the pure .NET realm, but he claims he doesn't. So, he has two problems: (1) understanding how .NET works to do what he wants if he was programming in C# and (2) porting that to LabVIEW.

 

I don't understand why people insist on making things difficult for themselves when LabVIEW has a perfectly fine progressBar control.

 

 

 

0 Kudos
Message 14 of 16
(752 Views)

Thank you for your attached modification, i am really new in these fields. And I am so sorry that i can´t bring my words to the correct way.

I knew that the Text can be added onto the Progressbar. But i dont konw how to port it from C# to LabVIEW. If you have any other

Suggestions, i am willing to learn!

0 Kudos
Message 15 of 16
(743 Views)

Hey Nyc,

you seem to know me very well :).I am really new in LabVIEW and C#, i dont know how to port C# to LabVIEW. But i do sure that it can be achieved. So i asked this Question here.

I still have a lot to learn, and thank you for your help. By the way, i will use the progressBar control by LabVIEW, when i do want to use it. 

As far as i am concerned, when I have a Question, I fully to find an answer, even i cant solve it by myself. That is the reason, why i would make it difficult.

I dont konw if you can understand my words. Sorry for my poor English, and thank you for your Help anyway.

0 Kudos
Message 16 of 16
(742 Views)