キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

.NET Progressbar Text

解決済み
解決策を見る

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 件の賞賛
メッセージ11/16
1,438件の閲覧回数

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

0 件の賞賛
メッセージ12/16
1,433件の閲覧回数
解決策
トピック作成者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 件の賞賛
メッセージ13/16
1,428件の閲覧回数

@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 件の賞賛
メッセージ14/16
1,423件の閲覧回数

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 件の賞賛
メッセージ15/16
1,414件の閲覧回数

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 件の賞賛
メッセージ16/16
1,413件の閲覧回数