Shopping activities want to make a lottery program, today we’ll take a look at the use of VB6.0 to make a lottery small program tutorial.
- Software name:
- VB 6.0 Chinese enterprise version free download (206M)
- Software size:
- Update time:
- 2020-01-08Download now
1. First, start VB6.0 and executeFile – new command, pop up the New Project dialog box, and selectStandard exeThen click the open button,Enter the main interface of VB program.
2. In the main interface, hold down the left mouse button and hold down any small square around the form to drag,Resizing the formUntil you are satisfied.
3. Select the form and find it in the properties on the rightBoderstyle property, settingsThe attribute value is none,And then find itStartupposition property, modify the attribute value to 2-screen center, and modify it againBackcolor propertyThe value is light yellow.
4. Select frame1 in the toolbox, and then drag it on the form. The size is smaller than that of the form, and adjust its position to center it. Find it in the property windowBackcolor propertyChange the property value to pink so that the settings look hierarchical.
5. Double click the label control twice in the toolbox to display two label controls in frame1,Modify the caption property of lable1 to “lucky draw”,Modify the caption property of label2 to “0” and the backcolor property of the two label controls to pink, andframeControl.
6. Select separatelyLabel1 and label2, modify its font property, open the font dialog box, select Wang Xizhi’s calligraphy font, the font is normal, the font size is No. 3, and click OK.
7. Select the button controls in the toolbox, double-click them four times in succession to display four buttons on frame1, adjust their positions on frame1 to make them orderly arranged, and modify the caption properties of the four buttons in turn, the values of which are“Number scroll, number stop, number reset, exit program.
8. Then select the timer control in the toolbox and double-click it to show the control on frame1. The control plays a very important role in timing. At the same time, it should be noted that the control is not displayed when the program is running.
9. Double click the number scroll control to enter the code editing area and select the objectcommand1，The click event is selected by the procedure. When the input code is
Timer1.Enabled = True
The main function of the trigger is to start working.
10. Double click the number stop button and enter the code asTimer1.Enabled = FalseThe function is that the trigger stops working.