I developed this small software for my friend a few days ago. He can use it at work, and let me help and make one. Open source code. You can modify and use it as needed.
Let's take a look at the thumbnail.
You can see it. It's easy. It's just a few numbers. After you click Start, the numbers keep changing. When you click STOP, a random number is generated.
This beautiful skin is made by others. I really forgot who it is, but it is also an Open Source
Let's talk about how the lottery code works.
First, I will get some numbers. These numbers are given by you. Where can I set them? After the numbers are obtained, they will be put into a list to store data?
Next we will create a random number. The range of the random number must be the length of the array. Each random number will not exceed the range of the array.
If a random index is successfully deleted from the list, the random index will be inverted and the lottery will be repeated.
Delete Code
_ List. removeat (k );
That's the logic of the big body.
Now let's talk about how to configure this small software.
There is a lottery. ini file in the bin directory of the project, which is mainly used to configure system parameters.
[Testini]
Number = 001,002,003,004,005,006,007,008,009,010,011,012,013,014,015,016,017,018,019,020,021,022,023,024,025,026,027,028,029,030
Speed = 50
Configuration instructions:
Number: number to be drawn, separated by commas (,)
Speed: lottery speed. The default value is 50. A greater value indicates a slower speed, in milliseconds.
I added a special effect to this small program, that is, after opening the program, there will be a win7 effect.
Finally, in the source code, I have installed the installation package. In setup1, it is an installation package, which can be generated and installed. This code is developed in vs2008.
This program is developed by the webmaster www.51ascx.com.
: Http://files.cnblogs.com/51ascx/Lottery.rar