Overclock.net banner

VB.NET - Strobe Light

2160 Views 3 Replies 2 Participants Last post by  CoreXE
Well, I know it might sound stupid, but it's still worth trying. I'm just making some code that changes the color of the BackColor of the main form. I also plan on making it so that if I press the + it speeds up, - it slows down, r for red, b for blue, g for green. I'm just in need of some help with the Timer bit. I want to make it so that I have two COLOR variables, and when I press one of the color buttons, it simply changes what color is stored in that variable, so I can do it with just a single time. Would a String be the best for this, and just set the BackColor to that String? Thanks for any help.
1 - 4 of 4 Posts
I prefer making the program to helping at every litte point of the program so I've made the full solution (commented, .NET 3.5). Hope it helps.
LL
See less See more
  • Rep+
Reactions: 1
I figured it out a while ago, but I'll check yours out as well.

Checked it out, very nice work. Didn't know you can use Color as a variable type. Any idea if you can do that in VB6? +Rep for taking the time to help. My code was a lot more repetitious than yours as well.
Quote:

Originally Posted by Nhb93 View Post
Any idea if you can do that in VB6? My code was a lot more repetitious than yours as well.
As far as I know there's no Color variable type in VB6, but I think it can be done with VB6 too. If I have time, I'll make it.
I always try to make my code in the most simplest form, but when I was new to VB I did the same, my code was long and difficult to understand. After coding a lot you'll learn how to do it shorter.
See less See more
2
1 - 4 of 4 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top