C
C#2mo ago
Majinko :D

✅ Winforms is pain (and i am stupid)

I have no idea but the Label is supposed to be simulating a power output. Everything works but the label always shows 0W when I move the trackBar. The trackBar should represent a precentage of 50W there fore I do 50W / 100% * trackBar.value but it just always shows a 0 am I missing something?
No description
7 Replies
SG97
SG972mo ago
have you debugged that it actually has a value other than 0?
Majinko :D
Majinko :D2mo ago
Yes, if I only put in trackbar1.Value it works It is the only variable that could be a 0 It stops working when I use the division
SG97
SG972mo ago
this is integer maths 50/100 will always produce 0 to make sure, use 50d
Majinko :D
Majinko :D2mo ago
Oh yeah you are right Thanks
SG97
SG972mo ago
$close 🙂
MODiX
MODiX2mo ago
Use the /close command to mark a forum thread as answered
SG97
SG972mo ago
unless you have other problems in the near future :when: