Beautiful lottery C # source code

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.