UNIVERSIDAD AUTÓNOMA INDÍGENA DE MÉXICO
DOCUMENTO DE REFLEXIÓN DEL APRENDIZAJE
COMPUTER SYSTEMS
SIXTH TRIMESTRE
|
APELLIDO PATERNO :
|
APELLIDO MATERNO: |
|
NOMBRE:
|
MATRÌCULA: |
INTRODUCTION
The Learning Reflection Document is an educational instrument; its objective is comparing the student’s knowledge with a standard suggested by the institution. At the same time the students (Titulares Académicos) must reflex about their capacities and look for their academic debilities, correct them before the accreditation.
The grade is a reference number, but if you get less than 7 we recommend you to studying more about the subjects you don’t understand.
Read carefully and answer the question as better as you can. Solve the cases below and turn back this document.
Case 1.- Build your own free web site. Let us know your URL.
Case 2.- Thomas Smith started a business company named “The Mola Co.” dedicated to buy and sell goods, register the operations using the analytic process, at the end of June he wants to know his financial position. Do the following operations:
a).- Register the operations on daybook.
b).- Set the operations from the daybook to the ledger.
c).- Do the necessary adjusts.
d).- Do the financial states basis to report the financial position.
What are the advantages Mr. Smith has using the analytic process?
What are the disadvantages using this process?
1.- On June first started the company with the following values:
|
Active |
Passive |
||
|
Cash |
$ 15,000 |
Supplier |
$ 19,000 |
|
Banks |
$ 19,700 |
Creditors |
$ 9,950 |
|
Goods |
$ 8,600 |
Documents for pay |
$ 8,800 |
|
Building |
$ 9.000 |
Capital |
$ 33,100 |
|
Furniture and equipment |
$ 5.600 |
|
|
|
Installation expenses |
$ 5,400 |
|
|
|
Stationary Material |
$ 2,750 |
|
|
|
Insurance Premium |
$ 4,800 |
|
|
2.- On June third are sold goods for $3,750 plus taxes in cash.
3.- On June fourth are bought goods for $6,000 plus taxes by check.
4.- On June fifth were refunded goods for $1,200 taxes included paid in cash
5.- On June seventh sales produced expenses for $1,000 plus taxes paid in cash.
6.- On June eighth were sold goods for $2,800 plus taxes paid by check
7.- On June ninth were bought goods for $7,200 plus taxes we own.
8.- On June tenth suppliers gave us discounts of $800 taxes included they reduced from our account
9.- On June eleventh were paid salaries for $1,800 plus taxes in cash.
10.- On June twelfth were refunded goods from the one we bought on June fourth for $1,400 taxes included paid by check.
11.- On June thirteenth according our physical inventory at the end there are goods for $9,900.
Case 3.- Read the following project and answer the questions.
OF A RAYON PLANT FOR PAKISTAN
The data used came mainly from the “Feasibility Report for the Establishment of a Rayon Staple Plant in Pakistan with a capacity of 20 tons/day ", prepared and kindly made available by Ing. A. Maurer S. A. " Bern The original feasibility report was not. Of course, prepared by Ing. A Maurer S.A. as a cost-benefit analysis, but with regard to its profitability, since their client was a private firm. The prices of chemical inputs were obtained from a recent copy of The Chemical Market Newspaper, the prices of synthetic fibers from Skinner’s Record of the Manmade Fibers Industry, quotations of transportation and insurance costs by telephone from a variety of shipping companies.
Rayon, the first man-made fiber, is derived from cellulose obtainable from plants. Cellulose is insoluble in water, but with suitable chemical treatment it is possible to obtain the cellulose in soluble form and convert it to useful fibers. Thus rayon staple can be produced from naturally grown raw materials (forestall trees, reeds, straw) or, as in this case, from cotton linters, the residue from the cotton crop. The rayon pulp (linters basis) is treated with caustic soda, suphurized with carbon disulphide, and dissolved in soda lye to the lye to the so-called ‘viscose’ solution. This solution is of sulphuric acid, salts of sodium is pressed through the tiny boles of spinning jets into an aqucous solution of sulphuric acid, salts of sodium, and zinc, where it coagules, forming an endless cable of filaments which are cut, washed, dried, and finished for sale.
The process is quite old and very well known; but in Europe and the United States, rayon staple fiber is made from the much cheaper wood pulp, since its manufacture from cotton linters would be uneconomical. In Pakistan, however, cotton linters is the cheapest locally available raw material, since the processing of wood into wood pulp on the small scale required would be both very complex and much more costly. The final product, rayon staple fiber, has certain advantages over both natural fibers and synthetic fibers derived from petro-chemical sources; and it is usually used mixed with other fibers.
The plant is designed to produce 20 tons of fiber a day in continuous-process, three-shift operation, and is expected to operate 350 days per annum – two weeks a years being enough 7,000 tons; and the builders consider it feasible for the Pakistani firm to operate it at full capacity. The contract proposed is a ‘turn-key’ contract, which provides for the engineering firm to design and build the plant, train local staff, and hand the plant over in fully operating condition, with quantity and quality of output guaranteed.
All data in the tables are in Pakistani rupees, mainly because the original project was written in rupees and, by expressing accounting values in the same currency, the private and the social benefit calculations become easily comparable. But this should not blind the reader to the fact that all accounting prices were derived from foreign currency equivalents as explained in earlier chapters. These were converted to rupees at the official exchange rate (although any arbitrary exchange rate would have done as well, so far as the calculation of present social value is concerned).
The main summary Tables A1 and 2, giving investment and operating costs respectively, are arranged in four columns. The first column consists of the original project figures. The second column labeled ‘accounting values (excluding unskilled labour)’ contains our estimates of these. The third column contains wage payments at their actual estimated values. Labour was kept separate so that anyone could calculate the present social value at different possible shadow prices for labour. The fourth column is merely the difference between the sum of columns (2) and (3) and column (1). It consists largely of taxes and subsides.
As you know the accounting values are based on world prices, cif or fob depending on whether the good is an import or export. But since we are dealing with a hypothetical situation (broadly speaking, one in which the country has adopted an optimal foreign trade policy, and where our rules for project selection have been in force for some time) we needed to ascertain, not whether an item was actually imported or exported, nut whether it would be in such an optimal situation. As a rule of thumb all manufacturing equipment and natural resources not available in the country (e.g. oil) were treated as imports of potential imports (for short we call actual or potential imports, exports, or traded goods, ‘importable’, ‘exportable’ and ‘tradable’ respectively): for other material and staple products quoted fob New York or London prices were used as a reasonable approximation to both the cif actual price of importable and the fob actual price of exportable. The accounting price of the main material input, cotton linters, was, however, particularly difficult to estimate, and also particularly important. We therefore discuss it here in the text.
The world market process of cotton linter fob New York (and apparently also fob Karachi) was Rs. 952 ($200) a metric ton2. The world $16 million and Pakistan’s exports are less than $1/2 million: this means that the operation of this single and relatively small Pakistani plant would absorb 10 per cent of total world trade, assuming an average world price of $200, or 6 ½ per cent with an average world price of $125. One cannot therefore regard the world price of cotton linters as given, and uninfluenced by the decision whether or not to build this plant; according, the world price of linters cannot be used for valuing its input in a social cost-benefit calculation, because it does not reflect its social marginal cost.
As already mentioned, in Western countries, rayon staple fiber is more economical to manufacture from wood pulp. In Pakistan, the processing of lumber into wood pulp would be too costly on so small a scale; but it would be cheaper to manufacture the fiber from imported pulp than from cotton linters at their world price. More exactly, if Pakistan could export and sell aboard its cotton linters at the world price of $200/ton, use part of the foreign exchange so obtained to import wood pulp out of which to produce rayon staple fiber, she would save $90 in foreign exchange per ton of fiber produced (less the insignificant cost of shipping the linter).
The smallness of the world maker for linters renders this impossible. No estimates are available of the price elasticity of world demand for linters: it was assumed, therefore, that the marginal revenue from exporting linters, which is the social marginal cost of using them domestically, could not exceed the level at which fiber production from domestic linters would be no more costly than fiber production from imported wood pulp. This level was estimated to be $125 a ton. At any higher accounting price, it would pay Pakistan to export her linters and run the plant on imported wood pulp. This gives an upper limit. At this price or higher the plant would or should use wood pulp. It also happened that $125 was the average recent actual price obtained for United States exports of cotton linters as distinguished from the quoted New York price of $200. Without knowing more about the supply position from other cotton-growing countries, it was very difficult to say whether Pakistan could sell the 8,400 tons per annum which the project would use at around $125 – but, since this price was already only five-eights of the quoted price it was initially treated as both a maximum and a minimum. However, the calculations have also been reworked to show how low the accounting price of cotton linter would have to be if the project was to yield as much as 10 per cent in real social terms.
The notes to Table A1 and A2 explain the assumptions made in making the division of costs between columns (2) and (3), and in arriving at the accounting prices used for column (2), in the case of tradable (apart from cotton linters which has already been considered), and minor nontradable items. The two main non-tradables, civil engineering and electricity, required separate treatment (internal transport was not allowed fro, for lack of data: but it is extremely unlikely that this neglect could make a significant difference to the results). Their treatment was carried out, so far as possible, according to the principles outlined in 12.3 This is all described in the two notes on Civil Engineering and Electricity at the end of the case study. At various points in the calculations use was also made of a standard conversion factor as described in 12.4. Thus, where no better estimate could be made, domestic values were converted to accounting values by subtracting from the former the weighted average price differential between the domestic value of tradables (both imported and exported) and their world-market value converted at the official exchange rate. We used Prof. S.R. Lewis’ estimates of price differentials for Pakistan, and Pakistani official trade statistics. The price differential for each item was weighted by the value of trade; and the weighted average so obtained was rounded, giving an average of 60 per cent of the world price to which it is added, or of 37 ½ per cent of the domestic price of which it forms part.
Attention is also drawn table A2 which discusses the maintenance and replacement provisions. The most usual way of dealing with a project is to assume a life, and allow for maintenance, and for major replacements when they likely to occur, and finally bring in a positive value at the end representing the scrap value of the plant. In this case, however, it was easier to estimate an annual sum which could keep the plant fully competitive for ever. For ever sounds a long time: but in practice it would make virtually no difference if a life of, say, 50 years had been assumed.
Table A3 takes the investment costs of Table A1 and phases them over the two and a half year expected construction period.
Table A4 shows the time profile of the project bringing together investment costs and operating costs and benefits. The first two rows are taken from Table A2 and A3. The third row introduces the shadow wage rate at accounting prices was estimated. Assuming that unskilled labour would consume all its wages, and applying the standard conversion factor, consumption at world prices would be 62 ½ per cent of the actual wage. Thus where w is the actual wage, and c consumption at accounting prices, we have c= 65.5/100 w. From the discussion it appeared that the shadow rate for Pakistan expressed as a percentage of c should be rather high, and so 80 per cent was chosen. The shadow wage is there fore equal to 8c/10, i,c ½ w. The figures of raw (3) of Table A4 are there fore half those of row (1). If anything, 50 per cent may be on the low side, because the standard conversion factor almost certainly underestimates the ratio of world to domestic prices for the typical family budget of an unskilled worker. However, it makes rather little difference to this project what shadow rate is chosen, because labour costs, especially in investment expenditures, are a small proportion of the total.
Row (4) of Table A4 is the array of social profits which must be discounted to find the present social value. Rather arbitrarily an ARI of 10 per cent was chosen in the belief that Pakistan’s investments ought to be yielding at least this much. The upshot is that the social present value is negative, minus Rs.18,063. In arriving at this final value, we discounted Year 1 by nothing, Year 2 by 10/11, Year 3 by (10/11)2, and so on. If expenditures and receipts are evenly spread over the years, this in effect means that we have discounted to a point of time roughly six months ahead. No great distortion is likely to result from this, provided the same procedure is applied to all projects.
Since the present social value was negative at 10 per cent, the social internal rate of return was also calculated. This turned out to be 5.4 per cent. The private rate of return given a 100 per cent tariff, had been estimated to be 12.3 per cent.
Some reasons may wonder that no allowance has been made for external economies. In truth, we could think of no external economies except labour, and perhaps management, training, But, relative to other industrial projects these would probably be less than normal, partly because it is relatively capital-intensive so that the up-grading of unskilled labour is not large compared to the investment expenditure, and partly because the techniques are, simple, specialized, and standardized, so that the practical engineering and administrative experience involved is unlikely to be at all catalytic.
Finally, there is the question of risk – the risk that our estimates are wrong. It is on balance clear that this is rather a low risk project. Since the techniques are long-established, and the consulting firm has vast experience of erecting such plants in many countries, including many developing countries, their predictions can be taken as being as accurate as any such are likely to be. We can only have erred on the side of optimism in accepting their view that the plant could operate continuously at 100 per cent capacity after two and a half years.
It is also clear that the supply and marketing risks are small: the most costly material input is domestically supplied, and the output is for a domestic market which would be assured if the plant were built. There is also rather unlikely to be any fall in the accounting price of the output, since rayon is a long established product with settled techniques and very unlikely to be superseded. The chief risk in our calculations is undoubtedly the price of cotton linters. As we know, the present accounting price assumed cannot have been too high, for if it were any higher the plant could operate on imported wood pulp. On the other hand, it is possible that wood pulp would get more costly over the years, so that the maximum price of cotton linters could rise, and make the assumed accounting price too low. As against this, it may be that now or in the future the alternative use value (for export) for cotton linter is less that $125 per ton. Since the project has negative present value at this price (at a 10 per cent rate of discount) it has to be, to give the project a positive present value at a 10 per cent discount rate. This calculation has been done, and the answer is that the price must be about 39 per cent lower, or about $76 per ton.
There is danger in calculating, as above, the value of an uncertain price which is just low or high enough to make the project viable (or definitely not viable). This is because it may set people arguing that this is the right price. But, bearing this in mind, it is quite a useful thing to do, because sometimes the price that would have to be assumed is plainly absurd.
1.- What do we conclude from this case study, is it acceptable or unacceptable with the information we have? Explain
Table A1. Investment costs
Value as Accounting
Stated in values for goods unskilled
ITEM Project and services labour The rest
Report excluding (actual value) (2)+(3)-(1)
Unskilled labour
1.- Imported equipment 22,000 22,000 ___ ___
2.- Duty on above 4,975 __ ___ 4,975
3.- Locally produced equipment 4,900 4,900 ___ ___
4.- Local labour, works and tools 1,200 120 1,080 ___
5.- Foreign labour during start-up 700 700 ___ ___
6.- Total cost of equipment 33,775 27,720 1,080 4,975
7.- Engineering services 2,400 2,400 ___ ___
8.- Civil engineering and works 11,000 4,400 2,420 4,180
9.- Land 150 94 ___ 56
10.-Lighting and fire equipment 350 350 ___ ___
11.-Contingencies 500 367 37 97
12.-Working capital 4,100 2,378 164 1,558
13.- Management and overheads during start-up 1,500 938 ___ 562
14.-Total investment cost 53,775 38,647 3,701 11,428
Table A2. One Year’s operating costs and receipts at 100 per cents (7,000 tons capacity)
Value as Accounting
Stated is values for goods Unskilled Labour The rest
Project & services (actual value)
Report excluding
Unskilled Labour
1 2 3 4
1.- Cotton linters See 4,998 ___ ___
2.- Chlorine note 48 ___ ___
3.- Sodium bisulphate to 17 ___ ___
4.- Sulphur item 870 ___ ___
5.- Chatcoat 6 92 ___ ___
6.-Total of above 13,019 6,025 ___ 6,994
7.- Caustic soda 4,200 2,939 ___ 1,270
8.- Other materials 630 472 ___ 158
9.- Filter materials 315 197 ___ 118
10.- Packing materials 154 96 ___ 58
11.- Maintenance materials 385 241 144
12.- Electricity 1,803 1,442 433 -72
13.- Steam 1,740 870 ___ 870
14.- Technical and admve staff 445 445 ___ ___
15.- Other labour 570 ___ 570 ___
16.- Overhead expenses 770 480 ___ 290
17.- Total ‘cost of production’ 24,031 13,195 1,003 9,830
18.- Maintenance and replacement of
equipment 3,378 2,772 108 498
19.- Maintenance and replacement of
building 330 132 73 125
20.- Total operating cost 27,739 16,102 1,184 10,453
21.- Total receipts 36,492 18,957 ___ 17,535
22.- Net revenue 8,753 2,855 -1,184 7,082
Table A3. The phasing of investment costs as in Table A1 over the 2 ½ year projected construction period
1ST Year 2nd Year 3rd Year
1 2 3 1 2 3 1 2 3
1.- Imported equipment 7,333 7,333 ___ 14,667 14,667 ___ ___ ___ ___
2.- duty on above 1,800 ___ ___ 3,175 ___ ___ ___ ___ ___
3.- Locally produced equipment 1,633 1,633 ___ 3,267 3,267 ___ ___ ___ ___
4.- Local labour, works & tools 120 120 ___ 1,080 ___ 1,080 ___ ___ ___
5.- Foreign labour during start-up ___ ___ ___ ___ ___ ___ 700 700 ___
6.- Total cost of equipment 10,886 9,086 ___ 22,189 17,934 1,080 700 700 ___
7.- Engineering services 200 200 ___ 1,100 1,100 ___ 1,000 1,100 ___
8.- Civil engineering & works 7,000 2,800 1,540 4,000 1,600 880 ___ ___ ___
9.- Land 150 94 ___ ___ ___ ___ ___ ___ ___
10.- Lighting & fire equipment ___ ___ ___ 250 250 ___ 100 100 ___
11.- Contingencies ___ ___ ___ 250 183 250 183 ___
12.- Working capital ___ ___ ___ 2,000 1,160 80 2,100 1,218 18
13.- Management and 84
overheads during start-up 200 125 ___ 800 500 __ 500 313 ___
14.- total investment cost 18,436 12,305 1,540 30,589 22,727 2,058 4,750 3,614 102
Table A4. Time profile of the project
Year 1 Year 3 Year 3 Year 4 and all
Subsequent years
1.- Labour – actual value (sum of cols. 3
of Table A2 and A3) -1,540 -2,058 -694 -1,184
2.- Accounting values (sum of cols. 2 of
Tables A2 and A3) -12,305 -22,727 -2,187 +2,855
3.- Labour at shadow wage equal to 50
per cent of actual wage (see text) -770 -1,029 -347 -592
4.- Total of rows (2) and (3) -13,075 -23,756 -2,534 +2,263
Present value of row (4) at 10 per cent
discount 18,086
CASE 4.- Translate the following paper and answer the questions below.
Visual Basic
This is a brief introduction of what VB is, what it has been and an overview of its capabilities. Assuming you have a basic knowledge of Windows 95/98.
What is Visual Basic?
Visual Basic is one of the most powerful developing tools for Windows available today. Originally Visual Basic was called BASIC. Language designers in the 50's developed the BASIC language for beginning programmers. At the time, BASIC was easier to learn than other languages such as FORTRAN or COBOL. True to the originial, Visual Basic does not stray from its roots; new ones learning programming can still create simple Windows programs in a short while, with minimal knowledge. It is to be noted that Visual Basic's simplicity should not be translated as inability. Advanced applications can be made with Visual Basic and it supports various advanced programming techniques, with the exception of true multiple inheritance.
Why has BASIC gone Visual? The role of programming has changed over the decades along with the progress of hardware design. Languages today stray greatly from the languages of a few years ago. Before the advent of GUIs(Graphical User Interfaces), a programming language was just a simple text-based tool to construct programs. Presently you need much more than just a language that spits out text. You need a development tool that can take advantage of Window's emerging features, such as graphics, multimedia, online and multiprocessd activities. Visual Basic is more than a language in that it lets you interact with these aspects of the Windows environment and create GUIs easily.
The transition from BASIC to Visual Basic is noticable. There are many new features. VB has a compiler that creates standalone runtime .EXE files that execute more quickly than previous versions of VB. A compiler is an application that converts the instructions you write, into a language that the computer understands, so that you and others can use the application. This compiler is called Developer Studio and is also used with lower level languages such as Visual C++ and Visual J++. So, in taking this tutorial you not only learn the IDE(Integrated Development Environment) for VB, but also for other languages. Additionally, wizards have been added to the IDE to speed up the development of programs. Wizards are question and answer boxes that help you step-by-step in creating a custom application.
Programming Languages
Like any other language, a programming language uses grammer, punctuation, and different parts of speech. A computer, though, cannot understand any person's spoken language, like English or Spanish. It is too ambiguous and general for computers to comprehend these. So a special kind of language is needed to control and take advantage of computer hardware. This leads us to one of VB's most noteworthy features: its language. The statements made in VB's language never have multiple meanings within the same context and they are not ambiguous. This is a key difference between other programming languages and it's what makes it easier for beginners. Throughout this tutorial you will pick up bits and pieces of the language and eventually learn the syntax and vocabulary of VB, just as you might learn a spoken language.
Once you grasp some of the syntax you will be able to embed instructions or code into your application. Code is the most integral part of programming in VB. It glues the processes, text, and graphics together to form a working application. Without it you would have a bunch of windows that do nothing. Code lets you, the application writer, tell the application exactly what to do, when to do it, and so forth.
The Programming Process
This section outlines the basic steps you will follow to create your first application in Visual Basic. You won't follow all of these sequentially or in one sitting. These will be re-visited as often as needed to fine-tune your program. This is the basic syntax for all programming development and is common among every programming language.
*Debugging is a phrase that harkens back to the more primitive times of computing. Before the transistor came along there were vacuum tubes...and lots of them. Moths and other light-attracted insects would get inside these tubes and computer operators would have to replace them, hence the phrase. The process of "debugging" is removing errors in your code. Just as you may mispronounce a phrase in English or use incorrect syntax(i.e.ain't, ya'll; my apologies to any southerners reading this), you can also make language errors in programming. These errors are called bugs.
Running Visual Basic IDE (Integrated Development Environment)
This section focuses on the Visual Basic Integrated Development Environment. As mentioned in the previous section, an IDE is an environment on the computer in which you develop and compile programs. As time goes on, and you spend more and more time programming, you will become intimately familiar with this environment. A short overview is needed to get started, and from there you can explore the rest. It is assumed that you have basic knowledge of navigating within Windows and it is recommended that you are comfortable with the environment and its parts, like resizing windows, working with the menu system and other features. If you can do those things you have all the prerequisites for this tutorial.
Getting to Know The VB IDE
To begin open Visual Basic by double-clicking its icon on the desktop or finding it in the Start menu. On most operating systems you should see a start-up screen. This is the New Project dialog box. If you do not see the New Project dialog box press Ctrl + N, or alternately select it from the File menu. If you don't want to see this every time you open the IDE, check the box labeled 'Don't Show this dialog in the future'. You have many different project types to choose from, but for now click Standard EXE twice to select it. This will be the usual project type you will select when starting a new program. After choosing which type of project, the development area loads. This may look daunting at first, but it's easy, you can fully customize it to fit your needs as a coder. Over time you'll want to adjust the screen's window sizes to your liking and kill certain windows you don't like. You can exit the IDE simply by choosing Exit in the File menu or by pressing Alt + F4. Before quitting, if you have made any changes in your code, VB will prompt you to decide whether or not you would like to save these.
The VB IDE is'nt something you can learn right away, and it'll take some hours in front of the computer to really get a handle on all of its options, but it's important you know the basics and how to maneuver around in the developing area. Plus, as mentioned earlier, after learning this IDE you will have also learned the IDEs for Visual C++ and Visual J++. You'll have a better idea of phrases used in proceeding sections of this tutorial if you take the time now to familiarize yourself with Figure 1. It dentifies some of the parts of the IDE that you'll be using frequently, familiarize yourself with what each window is called, so you'll know what I'm talking about in future sections and don't hesitate to refer back to it if you forget.
The primary windows you will be working in during development are the Form windows. As labeled above in Figure 1. By default, the IDE displays one form, Form1. So, if you write a Windows-based interest calculator with this form, the calculators buttons, text and graphics all reside in Form1. You can resize the form window inside the IDE by clicking on the small box on the bottom-right corner of the form, this will stay the default size after you compile the program, so make sure the form's size is what you want. So where's the code? The form just holds the program's interactive items, such as a command button, text boxes and labels. The code appears in a special window called the Code window. This does'nt appear in Figure 1 but you can see the code window by double-clicking on Form1 or alternately clicking View on the menu bar and then selecting Code. The Code window is a text editor, much like notepad or Microsoft Word. This is where you will actually program.
The program in Figure 1 was created by opening a New Project, and adding objects from the Toolbox on to the form. These tools interact with the user in various ways. This is a process you will be doing with simple programs as well as advanced applications. You'll begin with a blank form and add buttons and other items and tie it all together with code located in the Code window. Perhaps you'd like a form within a form. A good example of this type of program is Microsoft Word. In Word, you can open multiple documents and minimize them inside the main form of Word, allowing you to edit multiple documents at once. This multiple-form type application is called a MDI(multiple-document interface). Logically a program only requiring one form is an SDI or Single Document Interface, a good example of a SDI application is notepad, which only allows you to edit one document at once.
To familiarize yourself with the Toolbox run your mouse cursor over each item inside the box to get a description of what each is. These aren't all the options at your disposal, and you can add more by right-clicking on the Toolbox, selecting Components, and then choosing an object from the resulting window.
The Project Explorer Window is another window in the Dev. area that you should be familiar with. Microsoft changed the formal name from Project window to Project Explorer window between versions 4 and 5 of VB to celebrate the resemblance of the window to the typical Explorer hard drive navigator. You can expand and collapse branches just as you would do if you were browsing directories on your hard drive. The window contains objects such as forms, modules(a type of object containing special code), classes (an advanced module), and more. So if you have five forms in your application and would like to edit Form1, you'd find Form1 using the explorer(much like finding a file on your hard drive named Form1) and click on it twice to edit it.
The Properties Window contains detailed descriptions of each object within your program. If you select Form1(if the form has square boxes at each corner it is selected) and look at the window labeled Properties Window you'll have a list of editable properties. You don't have to understand what all of these do, for now just remember where you can view them.
This concludes the overview of the IDE and its various windows. These windows will play an important role in developing your software. Don't worry if you're still not sure about some of them , with some reading and some experimenting you'll have a good handle on the Developer Studio.
Getting Help in the IDE
From other programmer's websites to the ever-cluttered Microsoft homepage you can find help for Visual Basic. But if you'd like to get help the old-fashioned way, that is, not using the internet, you'll find the IDE is more than equipped to answer your questions than most websites, including this one. If you need help with a control, tool, or command, you name it, you can press F1 while selecting the object in question. This pulls up VB's help index, which is just a list of help topics in alphabetical order. Try and figure out programming problems by yourself before resorting to this resource, often you'll find a minor bug and correct it. Use it to learn new syntax. This is an priceless resource, so familiarize yourself with it, and you'll be glad you did.
This concludes the tour of the VB IDE. You've browsed all parts of the environment including the toolbox, Form window, Project Explorer window, and the Properties window, as seen in Figure 1.
Summary
During this chapter you were introduced to Visual Basic and its roots and purpose. This is a simple language as far as programming languages are concerned, but in no way does that make it incapable of advanced functions. You've learned that VB is similar to spoken languages, in that it has correct and incorrect syntax and grammar. You will explore this area more. In the Programming Processes section you learned the common routine of coding a program in any language. Although VB's IDE seems to blur the difference between some of those steps, making it easier for you to debug. Finally you took a tour of the development environment that you will be coding in.
Now we're going to cover every control in the Standard edition with the exception of the three custom control, and practically everything you can do with that control. You are already somewhat experienced with VB and know what the controls do, so match the following pictures with the name and the definition.
|
1.- |
2.- |
3.- |
4.- |
5.- |
6.- |
|
|
|
|
|
|
|
|
7.- |
8.- |
9.- |
10.- |
11.- |
12.- |
|
|
|
|
|
|
|
|
13.- |
14.- |
15.- |
16.- |
17.- |
18.- |
|
( ) |
List Box |
( ) |
This is an option that can either be checked, unchecked, or grayed. They are like survey things that ask you "what magazine(s) do you read, check all that apply." Then there would be a list of magazines, and you'd put a check in front of any that fit the description. In other words, more that one can be checked at a time. The .caption property defines what you are checking. This would be the name of the magazine in our example. The .alignment property can be set to either right or left, defining where the box is in relation to the text. Most importantly, the value property defines the checkbox as being either check, unchecked, or grayed. |
|
( )
|
Frame |
( ) |
This is a simple version of a combo box. Actually, a combo box is a combination of a text box and a list box, but let's not get technical! It can do everything a combo box can do, but since it doesn't have a text box part, nothing appears to happen when you select something. However, the .text property is being set just as before. |
|
( ) |
Combo Box |
( ) |
This is what this control is used for. You can control the data in a database very easily and without even using code with Visual Basic simple data access features, although a little code can make all the difference! |
|
( ) |
Text Box |
( ) |
You have also seen them in the Windows operating system; in dialog boxes in particular. They are used to group a series of controls together. Grouping controls can have a number of effects. First of all, the coordinate system for a control is based on it's bounding control. Don't worry, I'll interpret that into English. Every control has an x,y coordinate, x being the distance from the left and y being the distance from the top. The coordinate specifies the upper left corner of the control, and the .width and .height properties of the control define, well, the width and height. Coordinates are measured in twips, which is a unit used in GUIs. Twips are usually used instead of pixels because the screen resolution determines the size of the pixels. There are always 1440 twips in an inch. If you put a control at 0,0 in a form by itself, it's upper left corner will be at the upper left corner of the form. |
|
( ) |
Drive List Box |
( ) |
The drive box has a .drive property which describes the current drive displayed in the box (such as "a:" "c:" or "d:"). |
|
( ) |
Shape |
( ) |
Here's the first advanced control we're covering. It drops down list boxes with a text entry box at the top. It displays a list of items in a list when you click the arrow on the right. There is a text box at the top which allows the user to type in stuff, and possibly add an item to the list if that's what the programmer allows. |
|
( ) |
Command Button |
( ) |
In a Windows program you will often see text above or to the left of a text box identifying what the purpose of that text box is. Its primary purpose is to show the user of your program what something on the form does, but it can also be used to display a message or some result calculation that is not intended to be changed by the user. |
|
( ) |
Data Access Control |
( ) |
The directory list box has a .path property which describes the path of the current directory selected in the box (such as "c:\" "c:\windows" or ( "d:\windows\system"). Notice t hat when the root directory ("a:\" "c:\" or "d:\") is selected in the directory list box, a backslash comes after the drive letter, but when any other directory is selected, there is no postfixed backslash. |
|
( ) |
Picture Box |
( ) |
It is primarily used for displaying images (duh). Pretty much everything I say here applies to the Picture box control as well with the exception of the .Stretch property. Pictures can be loaded into visual basic, as long as they are either Windows Bitmaps (.bmp - the most common), |
|
( ) |
Directory List Box |
( ) |
This is a fun control. It is very simple and straightforward, and it is extremely useful. When you want code to be executed many times in regular intervals, this is an option |
|
( ) |
Check Box |
( ) |
We'll be using it a lot in VB programming. Command buttons are clickable options in windows like OK, CANCEL, RETRY, ABORT, FAIL, etc. When you click the button, the _Click event is generated for the control. The .caption property determine s what is displayed on the button. This is kind of a cool trick that applies to any control: when you put a & symbol in front of a letter in the .caption property, that letter is underlined. An underlined character means that the user can press ALT and that letter to click that control (or in most cases, just set the focus to it). |
|
( ) |
Horizontal and Vertical Scroll Bars |
( ) |
It works virtually the same way as the shape control with a couple property differences. You have the .BorderColor, .BorderStyle, and .BorderWidth properties that define the attributes for the color, style, and thickness of the line that is drawn. |
|
( ) |
Line Control |
( ) |
Its primary purpose is to display a method of the user typing information to the program. It can be several lines long, like a word processor form. The .text property of the text box determines it's text, which can be set at design time or run time (by the program OR the user). It is a useful control, but not very advanced. You cannot place carriage returns through code into a text box using Chr$(13), and the te xt box can only contain text of one font and color at a time. |
|
( ) |
Label |
( ) |
These buttons are like check boxes, only just one of them can be enabled at a time (plus there is no grayed value for the .value property). You will want to separate it in to groups using either frames or picture boxes. They are like questions on a survey which ask you "What year of high school are you in," and the options are FRESHMAN, SOPHOMORE, JUNIOR, SENIOR, or NONE. You can't be more that one, so only one can be checked. If you have two "questions," then they should be separated into groups. |
|
( ) |
Radio Button |
( ) |
File list box have a .path property, and they both work the same way. In fact, you would usually put a line like flbFiles.Path = dlbDirectories.Path in the directory list box's _Change procedure. |
|
( ) |
File List Box |
( ) |
This control is like a form within a form. Its primary use is to display pictures, as the name implies, but it can also be used to contain other objects within a group like a frame, or to display messages. The print method can be used on the it to display text, and other controls can simply be dragged into the box while in design time to make them part of it (in a sense). |
|
( ) |
Timer |
( ) |
A scroll bar is a very common windows element that lets the user give input on a scale and at the same time, gives the user output on a scale. This scale is manipulated by either clicking these ones |
|
( ) |
Image Control |
( ) |
This control is pretty self explanatory and simple to use. Design time graphics could probably be done without, but they provide a quick and easy way to create graphics that look good with your program, so it's an appropriate part for the purpose of the language. |