⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vel02.htm

📁 简单的说明如何使用VB,非常适合初学使用者,而且是用图表来解说的
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<HTML><HEAD><TITLE>Visual Basic in 12 Easy Lessons vel02.htm </TITLE><LINK REL="ToC" HREF="index.htm"><LINK REL="Index" HREF="htindex.htm"><LINK REL="Next" HREF="velp01.htm"><LINK REL="Previous" HREF="vel01.htm"></HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080"><A NAME="I0"></A><H2>Visual Basic in 12 Easy Lessons vel02.htm</H2><P ALIGN=LEFT><A HREF="vel01.htm" TARGET="_self"><IMG SRC="purprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A><A HREF="index.htm" TARGET="_self"><IMG SRC="purtoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A><A HREF="velp01.htm" TARGET="_self"><IMG SRC="purnext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A><HR ALIGN=CENTER><P><UL><UL><UL><LI><A HREF="#E68E12" >What You'll Learn</A><LI><A HREF="#E68E13" >The Visual Basic Primer Disk</A><LI><A HREF="#E68E14" >Installing the Visual Basic Primer Disk</A><LI><A HREF="#E68E15" >Starting and Stopping Visual Basic</A><LI><A HREF="#E68E16" >The Visual Basic Environment</A><LI><A HREF="#E68E17" >The Five Windows</A><LI><A HREF="#E68E18" >The Top of the Screen</A><UL><LI><A HREF="#E69E20" >The Menu Bar</A><LI><A HREF="#E69E21" >The Shortcut Access Keys</A><LI><A HREF="#E69E22" >The Toolbar: Push Button Swiftness</A><LI><A HREF="#E69E23" >The Measurement Indicators</A></UL><LI><A HREF="#E68E19" >Homework</A><UL><LI><A HREF="#E69E24" >General Knowledge</A><LI><A HREF="#E69E25" >Extra Credit</A></UL></UL></UL></UL><HR ALIGN=CENTER><A NAME="E66E2"></A><H1 ALIGN=CENTER><CENTER><FONT SIZE=6 COLOR="#FF0000"><B>Lesson 1, Unit 2</B></FONT></CENTER></H1><BR><A NAME="E67E5"></A><H2 ALIGN=CENTER><CENTER><FONT SIZE=6 COLOR="#FF0000"><B>First Look at Visual Basic</B></FONT></CENTER></H2><BR><BR><A NAME="E68E12"></A><H3 ALIGN=CENTER><CENTER><FONT SIZE=5 COLOR="#FF0000"><B>What You'll Learn</B></FONT></CENTER></H3><BR><UL><LI> [lb] The Visual Basic Primer disk<BR><BR><LI> [lb] Installing the Visual Basic Primer disk<BR><BR><LI> [lb] Starting and stopping Visual Basic<BR><BR><LI> [lb] The Visual Basic environment<BR><BR><LI> [lb] The five windows<BR><BR><LI> [lb] The top of the screen<BR><BR></UL><P>This unit helps you install the Visual Basic programming system that comes with this book. You will find that the installation of Visual Basic is easy because Windows does most of the work for you. If you've installed other Windows programs before, you will have no trouble with installing Visual Basic.<BR><BLOCKQUOTE><BLOCKQUOTE><HR ALIGN=CENTER><BR><NOTE><B>Warning: </B>This book assumes that you have used Windows before. Although you might not be a Windows guru, you should be comfortable with starting Windows, using the mouse, selecting from Windows menus, and so on.</NOTE><BR><HR ALIGN=CENTER></BLOCKQUOTE></BLOCKQUOTE><BLOCKQUOTE><BLOCKQUOTE><HR ALIGN=CENTER><BR><NOTE><B>Tip: </B>If you want a good review of Windows fundamentals, get a copy of Alpha Books' <I>The Complete Idiot's Guide to </I><I>Windows</I> (ISBN 1-56761-175-3) and read it before going further with <I>Visual Basic Programming in 12 Easy Lessons</I>. You'll be glad you did.</NOTE><BR><HR ALIGN=CENTER></BLOCKQUOTE></BLOCKQUOTE><P>Before installing the program, this unit takes a few moments to describe exactly what you get with this book's bundled disk.<BR><BR><A NAME="E68E13"></A><H3 ALIGN=CENTER><CENTER><FONT SIZE=5 COLOR="#FF0000"><B>The Visual Basic Primer Disk</B></FONT></CENTER></H3><BR><P><FONT COLOR="#FF8000"><B><I>Concept: </I></B></FONT>With this book, you get a Visual Basic programming system with which you can learn Visual Basic and create your own Windows programs.<BR><P>The Microsoft Corporation has released several versions of Visual Basic. When version 1.0 hit the market, Visual Basic changed the way in which people viewed Windows programming. Even in its first release, Visual Basic was a powerful programming tool for introductory Windows programmers. With its visual placement of program and screen elements, you will literally draw programs instead of writing them. With every release of Visual Basic, Microsoft keeps adding more functionality and programming power.<BR><P>This book contains the Visual Basic version 2.0 programming system. This version of Visual Basic is called the Visual Basic Primer Edition. It includes everything in the original&#151;and really expensive&#151;Visual Basic version 2.0 Standard Edition except for these three modifications:<BR><UL><LI> [lb] You can create and run, but not compile, stand-alone Visual Basic programs.<BR><BR><LI> [lb] You can add a maximum of one form to your application.<BR><BR><LI> [lb] There is no online help available.<BR><BR></UL><BLOCKQUOTE><BLOCKQUOTE><HR ALIGN=CENTER><BR><NOTE><I>Definition: </I>A <I>compiler</I> creates a stand-alone program.</NOTE><BR><HR ALIGN=CENTER></BLOCKQUOTE></BLOCKQUOTE><P>When you buy a copy of Visual Basic&#151;and pay a whole lot more money than you did for this book and disk!&#151;you get everything you get here plus a compiler. This copy of Visual Basic enables you to create the same programs as the regular copy, but you must run those programs from within the Visual Basic environment. In other words, when you want to run the program that you write, you have to run Visual Basic first and use the Visual Basic menus to load and run your program.<BR><P>For most beginning and intermediate programmers, the second modification is not much of a limitation. You can add only one form to a program. One form is probably all you would be using anyway. It sometimes takes a fairly complicated Visual Basic program to require a second form.<BR><P>The third modification would <I>really</I> hinder most people, but not you. This book offers a better tutorial and reference guide than you would ever get with an online reference.<BR><P>What <I>can</I> you expect with the Visual Basic Primer disk? A version of Visual Basic that includes all the tools that you need to learn the in&#146;s and out&#146;s of Visual Basic. You will add advanced controls to your Visual Basic programs. You will be write programs that behave just like the major Windows applications you use daily. You will learn what programming is all about by mastering the Visual Basic programming language.<BR><P><FONT COLOR="#FF8000"><B><I>Review: </I></B></FONT>The disk that comes with this book contains the Visual Basic Primer programming system, which includes everything you need to create complete Windows applications.<BR><BR><A NAME="E68E14"></A><H3 ALIGN=CENTER><CENTER><FONT SIZE=5 COLOR="#FF0000"><B>Installing the Visual Basic Primer Disk</B></FONT></CENTER></H3><BR><P><FONT COLOR="#FF8000"><B><I>Concept: </I></B></FONT>Install the Visual Basic Primer programming system on your computer's hard disk.<BR><P>Installing the Visual Basic Primer is simple. The installation described in this unit assumes that you want to install the Visual Basic Primer on your hard disk drive named C and that you are installing from the floppy disk drive named A. Change the drive names accordingly if you want to install to or from different drives.<BR><P>Follow these steps to install the Visual Basic Primer on your system:<BR><OL><LI>Start Windows.<BR><BR><LI>When the Program Manager appears, select the Program Manager File Run command (point to the word File on the menu bar, click the mouse, and then click Run). Your screen will look something like the one in Figure 2.1.<BR><BR><P><B> <A HREF="02vel01.gif">Figure 2.1. Getting ready to install Visual </B><B>Basic.</A></B><BR><BLOCKQUOTE><BLOCKQUOTE><HR ALIGN=CENTER><BR><NOTE><B>Warning: </B>Almost every Program Manager displays different program group icons because almost everybody uses a different configuration of software packages. Therefore, your screen might hold a set of icons completely different from what is shown in Figure 2.1. The dialog box shown in the upper-left-hand corner is what matters.</NOTE><BR><HR ALIGN=CENTER></BLOCKQUOTE></BLOCKQUOTE><LI>At the Command Line prompt, type <B>A:\SETUP</B>&#151;either uppercase or lowercase is acceptable&#151;and press Enter. The disk in drive A will spin for a few moments, and the installation program will display an installation message box on the screen telling you that the installation process has begun.<BR>If you get an Application Execution Error when you type the installation setup command, press Enter and check the Command Line prompt that you typed to make sure that you spelled everything correctly. Make sure that there are no spaces in the command.<BR><BR><LI>When you see the Welcome message box, you know that you're on your way to a successful installation. At the Welcome message box, press Continue to tell the installation program that you are ready to complete the process.<BR><BR><BLOCKQUOTE><BLOCKQUOTE><HR ALIGN=CENTER><BR><NOTE><I>Definition: Default</I> is the value used if you do not type a different value.</NOTE><BR><HR ALIGN=CENTER></BLOCKQUOTE></BLOCKQUOTE><LI>As shown in Figure 2.2, Visual Basic prompts you for the exact location where you want to install the program.<BR>By default, the Visual Basic Primer program installs itself in a directory named VBPRIMER. VBPRIMER is a good name for the directory, so I suggest that you keep this name.<BR><BR><P><B><A HREF="02vel02.gif">Figure 2.2. Visual Basic wants to know where you </B><B>want the program installed.</A></B><BR><LI>Click the Continue button to continue the installation.<BR>When Visual Basic notices that the VBPRIMER directory does not exist, Visual Basic warns you that the directory does not exist with a message prompt. This is a silly message box because, of course, the directory does not exist! If the directory existed, you would already have Visual Basic Primer installed on your computer. Therefore, when Visual Basic tells you that the directory does not exist, mutter under your breath, &quot;No kidding,&quot; and press the Create Directory button.<BR><BR><LI>You will see one more message box that you can ignore. When Visual Basic displays the message box shown in Figure 2.3, press OK and don't worry about what the message box says. The message is a carry-over of the official&#151;read <I>expensive</I>&#151;version 2.0 release of Visual Basic, and this message box does not apply here.<BR>You need about two megabytes of free disk space for Visual Basic and the applications that you create with this book. Assuming there is enough disk space to install Visual Basic, the installation program proceeds to complete the installation. You will see a percentage gauge increase as the installation progresses.<BR><BR><P><B> <A HREF="02vel03.gif">Figure 2.3. You can completely ignore this </B><B>message box.</A></B><BR><BLOCKQUOTE><BLOCKQUOTE><HR ALIGN=CENTER><BR><NOTE><B>Warning: </B>Depending on your installation of Windows, one or two additional message boxes might appear that tell you of particular files that the installation program needs to overwrite. You can click the OK button to accept the information and move on. Also, there is another error message box that might appear that indicates an incorrect number of bytes were counted during installation. As bad as this message sounds, if you click Ignore&#151;one of the few times that you can ignore error message boxes&#151;the installation continues successfully.</NOTE><BR><HR ALIGN=CENTER></BLOCKQUOTE></BLOCKQUOTE><LI>During the installation, Visual Basic creates a new program group called Visual Basic 2.0 for the Program Manager's Visual Basic Primer icon. When the installation is complete, you are given the choice to start Visual Basic or to return to Windows. For now, return to Windows so that you can learn the standard startup method.<BR><BR></OL><BLOCKQUOTE><BLOCKQUOTE><HR ALIGN=CENTER><BR><NOTE><I>Definition: </I>A <I>control button</I> appears in the upper-left corner of every window.</NOTE><BR><HR ALIGN=CENTER></BLOCKQUOTE></BLOCKQUOTE><P>When you return to the Windows Program Manager, you will see the Visual Basic 2.0 window left open by the installation program. For now, close the window by double-clicking the control button to return the Program Manager to its regular state. (A state of confusion....)<BR><P>You have now successfully installed the Visual Basic Primer programming system, but there is one last thing you must do to complete the installation of this book's disk. This book's disk also contains all the book's complete working applications. The applications are in a directory called PGMS.<BR><P>Assuming that you have installed the Visual Basic Primer as described, follow these steps to copy the programs to the VBPRIMER directory so that you can load the programs easily as you work through them:<BR><OL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -