track bar int too double ?
-
whats the easyest way too adjust a track bar value from 1 too 100, into a double starting at 1.0 and working its way down to .0001 (for form opacity). i have it working with a huge switch, but i want a cleaner way to take the int value of say 100 too the double value of .0001
-
whats the easyest way too adjust a track bar value from 1 too 100, into a double starting at 1.0 and working its way down to .0001 (for form opacity). i have it working with a huge switch, but i want a cleaner way to take the int value of say 100 too the double value of .0001
form.Opacity = (double)trackBar.Value / 1000000; I think that should work... :~
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET
-
form.Opacity = (double)trackBar.Value / 1000000; I think that should work... :~
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET
thanks alot =) you just gave me back 200 lines of code i bet.. (it looks like that would work too me too...) im going too school as we speak to get my mcsd from a microsoft certified school.. for someone trying to become a windows app programmer (eventually games) is this a good start ?
-
form.Opacity = (double)trackBar.Value / 1000000; I think that should work... :~
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET
That will not work... 1 = 0.000001 100 = 0.0001 Depends if you want a linear function or a power function see http://www.perfectphase.com/store/slider.gif[^] Stephen.
-
thanks alot =) you just gave me back 200 lines of code i bet.. (it looks like that would work too me too...) im going too school as we speak to get my mcsd from a microsoft certified school.. for someone trying to become a windows app programmer (eventually games) is this a good start ?
Actually, I would look at this article instead. It seems to work: http://www.codeproject.com/csharp/transparentwindowsincsharp.asp[^] I think Game Dev would be better done in C++. You can do it in C#, but I haven't really seen a game written in C# aside from Chris Sells' Wahoo[^]
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET
-
That will not work... 1 = 0.000001 100 = 0.0001 Depends if you want a linear function or a power function see http://www.perfectphase.com/store/slider.gif[^] Stephen.
You're right. I should have just done this:
Form.Opacity = trackBar.Value / 100;
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past. -Chris Maunder Microsoft has reinvented the wheel, this time they made it round. -Peterchen on VS.NET