I want to create a lottery program for a shopping mall event. Today we will take a look at the tutorial on using vb6.0 to create a lottery applet.
1. First start vb6.0, execute the file-new command, and the new project dialog box will pop up. In the dialog box, select the standard exe and click the open button to enter the main interface of the vb program.
2. In the main interface, hold down the left mouse button and drag any small square around the form to adjust the size of the form until you are satisfied.
3. Select the form, find the borderstyle attribute in the properties on the right, set the attribute value to none, then find the startupposition attribute, modify the attribute value to 2-screen center, and modify the backcolor attribute value again to light yellow.
4. Select frame1 in the toolbox, then drag it on the form, making it smaller than the form, and adjust its position to center it. Find the backcolor attribute in the properties window and modify its attribute value to pink. Set it like this It looks layered.
5. Double-click the label control twice in the toolbox, display the two label controls in frame1, modify the label attribute name of label1 to Lucky Draw, modify the caption attribute of label2 to 0, and modify the backcolor attribute of the two label controls to Pink, consistent with the frame control.
6. Select label1 and label2 respectively, modify their font attributes, open the font dialog box, select the font as Wang Xizhi's calligraphy font, the font shape as regular, the font size as size three, and click the OK button.
7. Select the button control in the toolbox, double-click four times in succession to display four buttons on frame1, adjust their positions on frame1 so that they are neatly arranged, and modify the caption attributes of the four buttons in sequence. The attribute values are sequentially number scrolling. , number stop, number reset, exit program.
8. Then select the timer control in the toolbox and double-click it. The control will appear on frame1. This control plays a great role in timing. At the same time, it should be noted that the control will not be displayed when the program is running.
9. Double-click the number scroll control to enter the code editing area. Select command1 as the object, select the click event as the process, and enter the code as
Timer1.Enabled = True
The main effect is that the trigger starts working.