Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sorry, the pen lost control. Anyway, you need to download both the.vbp and the.frm for each project. I looked at PrCalc, I did not look at inventory.

Similar presentations


Presentation on theme: "Sorry, the pen lost control. Anyway, you need to download both the.vbp and the.frm for each project. I looked at PrCalc, I did not look at inventory."— Presentation transcript:

1 Sorry, the pen lost control. Anyway, you need to download both the.vbp and the.frm for each project. I looked at PrCalc, I did not look at inventory.

2

3

4 When visual basic 6 starts, I go with the standard default.

5 If the form does not come up correctly you can go to project add form and existing. It worked fine here. See notes at end of presentation if you have a problem loading the form.

6 I have loaded PrCalc which has the form frmCalc. If you cannot see the toolbox, the project explorer or the properties you can use the icons at the top to load them.

7 When I originally created this form I brought over labels, textboxes and buttons. When I name them I use frm for form, lbl for labels, txt for text boxes and either cmd or prj for projects.

8 This shows the name of the form and the caption that appears on the form.

9 This shows the label which was named lblReOrd. Note also the caption of the label.

10 When you click on the button, it will execute the code that has been written for the click event on the cmdTest command button. Here I am taking the contents of the text boxes, doing a calculation and assigning the results to the text property in txtNumOrder. More on this when we develop a project.

11 Now I am starting a new project by using file new project. When you save you can save project as and it should save both the project and the form. If it doesn't,be sure to save the form with a save form as. I am naming the form and giving it a caption.

12 I clicked on project in the project explorer and then in the properties window I can give the project a name.

13 I have brought over a label, gone to properties and given it a name and changed the caption property.

14 Now I have brought over a textbox, I am setting the text property to nothing by clearing out the text property that originally contained text1.

15 I have named the textbox as txtAmt1

16 I have added more labels and text boxes. This text box will hold the answer and is labeled txtAns.

17 Now I have added a command button.

18 The command button is named cmdClick. When I click on it, I cause the click event to happen and I create this sub routine where I will put the code.

19 I am assigning the results of the calculation to the textbox named txtAns. I am changing the text property of that box so it will hold the answer instead of being empty. Notice that I am doing a multiply and notice the use of Val. It works like parseInt/parseFloat did in JavaScript.

20 Buttons to start running or executing the program to test and the box to stop execution.

21

22 This shows the button with its name and caption.

23 This is an example I added when the form was not loaded correctly Click on project and then add form. Click on existing, pick the form and open.

24 I added the form, now when I try to run, I see this problem.

25 Click (OK) on it to fix and then select the name of the form from the box labeled Startup Object. It will now be able to run.


Download ppt "Sorry, the pen lost control. Anyway, you need to download both the.vbp and the.frm for each project. I looked at PrCalc, I did not look at inventory."

Similar presentations


Ads by Google