




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 淮 海 工 学 院毕业设计(论文)外文资料翻译系 (院): 计算机科学系 专 业: 计算机科学与技术 姓 名: 戴 永 丽 学 号: 111001203 外文出处:learn visual basic in 24 hours -hour 1 visual basic at work 附 件:1.外文资料翻译译文;2.外文原文。指导教师评语:外文资料的选材适中,和本课题结合比较紧密,内容是关于vb方面的问题,也正是本设计的开发工具之一。译文基本正确,达到要求字数,格式比较规范,基本完成了外文资料翻译任务。 签名: 2004年4 月16 日注:请将该封面与附件装订成册。附件1:外文资料翻译译文v
2、isual basic简介什么是visual basicmicrosoft visual basic 5.0是旧的basic语言最近的最好的化身,在一个包里给你一个完全的windows应用开发系统。visual basic (我们常称它vb)能让你写、编辑,并且测试windows应用程序。另外,vb有包括你能用来写并且编译帮助文件那的工具,activex控制,并且甚至因特网应用程序visual basic是它本身的一个windows应用程序。你装载并且执行vb系统就好象你做其它windows程序。你将使用这个运行的vb程序创造另外的程序。虽然vb是一个非常地有用的工具,但vb只是一个程序员(写
3、程序的人)用来写, 测试,并且运行windows应用程序的工具。尽管程序员们经常可替交地使用术语程序和应用程序,当你正在描述一个windows程序时术语应用程序似乎最适合,因为一个windows程序由若干份代表性的文件组成。这些文件以工程形式一起工作。通过双击一个图标或由以windows开始应用程序运行启动菜单用户从windows加载并且运行工程产生最终的程序。过去的45年与计算机硬件一起的编程工具的角色已经演变。今天一种程序语言,例如visual basic,一些年以前与程序语言的非常不一致。windows操作系统的视觉的天性要求比一些年以前是可利用的更先进的工具。在windowed环境以前
4、,一种程序语言是你用来写程序的一个简单的基于文章工具。今天你需要的不只是一种语言,你需要一种能在windows系统内部工作并且能利用所有的绘画、多媒体、联机和windows提供的多处理活动开发应用软件的绘图开发工具。visual basic是如此的一种工具。超过一种语言,visual basic让你产生与今天的windows操作系统的每个方面互相影响的应用程序。如果在过去你已经注意visual basic,你将很惊讶今天的visual basic系统。现在vb创造独立的运行时刻的一个真实的编辑器.exe文件比先前的vb程序更快速执行。vb也包括若干个提供逐步的对话框问题的奇才,这些对话框问题通
5、过应用程序指导你。vb的开发平台,一个叫开发者工作室的发展环境,现在支持和先进的visual c+,visual j+ 编辑器一样的特征。因此,一旦你学习微软的视觉的编程产品的之一,你将能熟练的使用其它编程语言在学习其它编程语言时你前面没有很长的弯路。语言 今天编程语言不再和它们以前一样。语言自己没变得不太重要,而是应用软件的绘画接口已经变得更重要。一台计算机不能理解任何人的说的语言。一种口语,例如意大利或英语,简单地太全面并且不明确,计算机不能理解。因此,我们必须适应机器并且学习计算机能理解的一种语言。vb的程序语言是相当简单的并且在最多的部分使用普通的英语词和短语。然而,语言明确。当你用v
6、isual basic语言写声明时,在一样的上下文以内声明从来没有多样的意思。vb编程进程当你想要使用可视化basic时,你将跟随这些基本的步骤:1 开始可视化basic。2 创造一个新应程序或装载一个存在的应用程序。当你创建一个新应用程序时,你可能想要使用visual basic的vb应用程序精灵来写你的程序的初始的外形。用visual basic提供的调试工具测试你的应用程序。调试的工具帮助你定位并且排除程序错误(bugs)。不管你尽最大的努力使他们出来,它们都能出现。3 编译你的程序进一个最终的应用程序。4 停止visual basic。5 分发应用程序到你的用户。你将很少连续执行所有的
7、这些步骤。6个步骤不是连续的步骤。但是你在完成你的应用程序前通过并且回到的阶段。开始visual basic你从windows启动菜单启动visual basic。visual basic开发环境它自身通常出现在叫做microsoft visual basic 5.0的子菜单上,尽管你的可能由于装置不同而有一些不同的权力。你将看到在microsoft visual basic 5.0子菜单上列出的程序。当你从子菜单选择visual basic5.0asic加载并出现在你的屏幕上。在大多数系统上,一旦你开始visual basic数字1.1的对话框出现。对话框让你启动vb应用程序精灵,编辑存在的
8、vb程序或从你最近已经处理的程序列表上选取,取决于你点击的对话框制表符。当你能看到对话框的底部,每次你开始当对话框的你能实际上是看,每次你开始viaual basic你不必看见对话框。在将来如果你点击选项标签,那么不显示选出这个对话框,当你开始visual basic时visualbasic将不显示开的对话框。数字1.1。当你开始vb时新工程对话框经常出现。一旦你关上对话框,规则的可视化basic屏幕出现。当数字1.2表演,vb打开的屏幕能开始工作!数字1.2表演visual basic开发环境,你将快变得密切地熟悉的环境。从这开发环境你将创建windows程序。 数字1.2。vb的屏幕看起来
9、糊涂。尽管屏幕看起来糊涂,你能充分定制适合你的需要和偏爱的visual basic屏幕将来,你将调整屏幕的窗户尺寸和皮肤并且显示某个窗户因此你的visual basic屏幕的开始状态可能与那数字1.2的非常地不一致。停止visual basic你将从visual basic退出并且回到windowsde的方法与你退出大多数windows应用程序的方法一样:选择文件|出口,点击visual basic的主窗口靠近的按钮,点击alt+f4,或双击那出现在的屏幕左上角vb的控制菜单图标。如果在当前开的工程以内你已经改变了一个或更多的文件(记得工程是包含你的应用程序文件的集合而成的),visual b
10、asic给你一个最后一个机会在退出windows前保存你的工作。掌握发展环境在你学习visual basic以前学习开发环境的细节是有点象在你学习开车以前学习一辆汽车的零件。然而,你花时间学习一些发展环境的更基本的原则,你将更好能学习visual basic。在vb的环境以内你将更舒适并且当在发展环境随后涉及的窗口和工具时将更好的理解一些联系的词。数字1.3说明了visual basic开发环境有许多更重要的屏幕成分的标记。你能从菜单和工具条发现,visual basic有点像市场上其它的windows程序。按照在另外的应用程序他们做的许多visual basic的菜单条命令工作就像它们在其它
11、应用程序,例如microsoft word,中做的一样。例如,你能选择编辑|剪切和编辑|粘贴来从一个地方剪切正文粘贴到另一个地方。今天,这些同样的菜单条命令几乎在市场上的每个其它的windows程序上出现。数字1.3。开始知道发展环境。标准: 菜单条和工具条visual basic的菜单条和工具条正如你期待它们的一样工作。你能点击或按一个菜单条选择的热键(例如, alt+f显示文件菜单)可以看见提供命令的项的下菜单选择的列表,其它的水平菜单,或对话框。许多菜单选择有快捷键(经常被叫了的加速器钥匙)例如ctrl+s为文件|保存选项。当你按一下快捷键时,你需要先显示菜单直接到存取选择。工具条提供一
12、个按钮存取许多普通的菜单命令。而不选择编辑|粘贴,例如,你能点击粘贴工具条按钮。就象今天大多数的windows应用程序,visual basic支持大量工具条。选择视图|工具条看可得到的工具条的一张列表。每一个都普遍的以一个有名字的检查标记出现。 表格窗口:它会在哪出现表格窗口是你主要的工作区域。尽管表格窗口起初相对于你的屏幕来说是很小,但是表格窗口包含你的应用程序的背景。换句话说,如果你用vb写一个基于windows的计算器,那么这个计算器的按钮都会存在于表格窗口上,而且当某人运行这个计算器的时候,这个计算器就会只出现在表格窗口连带放置在那的组件和连接在那的代码。提示:在表格窗口里你将不会看
13、到程序的代码。表格窗口支持程序的交互式对象,例如命令按钮、标签、文本框、滚动条和其他的一些控制。这些代码在别处出现,这个特殊的窗口被称为代码窗口。这个代码窗口并没有在1.3节中出现,但是你可以通过选择视图/代码来看代码窗口。一个代码窗口要比一个文本编辑器小,文本编辑器就是你写连接程序的程序说明时所使用的工具。考虑在1.4节窗口中运行的那个简单的程序。这个窗口显示一个简单的带有一系列选择的对话框、文本框和命令按钮。写这个程序的程序员是通过打开一个表格窗口,加入一些控制和连接一些组件来写的。那就是你将要做的不管是你写简单的还是复杂的vb应用程序。你将以一个空的表格窗口并向这个窗口添加控制例如选择和
14、命令按钮开始。或许你的程序甚至需要多个表格窗口。提示:一些程序,例如命令,允许在一个特殊的叫做mdi(multiple-document interface)的模块中出现多个表格窗口,这里你可以在同一个程序中打开多个数据文档。只需要一个简单的数据窗口的程序称为一个sdi(single-document interface)程序,例如windows的记事本程序一次只允许用户打开一个数据文档。sdi程序可能支持多个表格;然而,这些表格不但支持多个数据文件而且还为额外的对话框和第二工作屏幕提供扩展的支持。源程序是代码,表格,菜单,图表和你为形成一个工程而创建和编辑的帮助文件(也称为源代码)。部分你创
15、建的程序,例如表格,代码和你为输出准备的图形,包括源程序。当你或者其他的用户连接或运行这个源程序,vb将程序翻译成一个可执行的程序。你不能对一个可执行程序进行一个直接的修改。如果你在运行程序的过程中发现一些小错误,你必须修改源程序(在这个工程中包含多个文件)并再运行和再编译这个源程序。工具箱提供控制 工具箱包括你放置在表格窗口中的命令。你将在下一节课的时间学习到如何在表格窗口里放置工具箱命令。工具箱有用不完的命令;如果你在表格窗口中放置一个命令按钮,那么你也要在工具箱中放置同样的按钮。这些被称为固有命令因为vb的三个版本都支持这些标准的工具。你可以根据你的需要加一些额外的控制到工具箱中。一些额
16、外的工具在vb的三个版本中,但是这些额外的工具并不出现在工具箱窗口中,除非你通过工程/组件菜单选择中加入它们。如果你使用专业或者企业版本,你将能够加一些在标准版本中并不出现的额外的控制。表格设计窗口放置表格 表格设计窗口展现最初的位置和在表格窗口显示出来的正确的表格的相关的大小。已经学习过的程序是一个多重表格程序。带有文本框题目的表格只是若干表格中的一个。表格设计窗口总是显示在当前的表格窗口中表格在哪出现。如果你想让某个表格在当前位置的不同地方出现的话,那么你可以在表格设计窗口内将表格移动到表格出现的位置当用户运行这个程序时。提示:注意表格位置指示器,在工具栏按钮的右边,当你在表格设计窗口移动
17、表格时,它的位置将会改变。工程资源管理器窗口工程资源管理器窗口,经常被称为工程窗口,为你提供在应用程序中所有文件的树状结构。微软在版本4和版本5之间的版本中将名字从工程窗口改为工程资源管理器窗口,用来庆祝在windows 95和nt中普遍的树状型文件和典型资源管理器之间的类同。你可以扩展和结合观点的分支以获得多多少少的描述。道具窗口道具是被一个命令的描述性信息详述的。每次当你点击一个不同的表格窗口工具时,一个不同的列表将会在道具窗口中显示出来。道具窗口描述关于某一形式命令的特性(描述性的和功能性的信息)。在vb中很多特性基本上存在每一个对象中。帮助在你指尖中 在线图书就是关于vb的电子图书适合
18、vb程序员。 vb的在线帮助系统是市场上最先进的系统之一。当你需要帮助做一个控制,窗口,工具,或者命令时,请按f1。vb分析你所做的并提供帮助。除此之外,vb还提供一个巨大的帮助资源叫做在线图书。当你在帮助菜单中选择了在线图书时,vb会展示关于vb的一系列树状结构形式的书,这样你就能找到你所需要的书籍并阅读。这个在线帮助也扩展到internet上。如果你可以连接到internet,那么你就可以通过选择在线帮助/微软浏览到最新的帮助主题。总结这段时间快速的带你熟悉vb。你或许已经比开始时更明白vb了。程序员用vb开发非常先进的windows应用程序。现在你明白了vb的用途和怎样去打开、关闭vb,
19、你准备好全心的投入到vb的学习中。 附件2:外文原文(复印件)whats visual basic about?controls are tools on the toolbox window that you place on a form to interact with the user and control the program flow.microsoft visual basic 5.0, the latest and greatest incarnation of the old basic language, gives you a complete windows app
20、lication development system in one package. visual basic (or vb, as we often call it) lets you write, edit, and test windows applications. in addition, vb includes tools you can use to write and compile help files, activex controls, and even internet applications.visual basic is itself a windows app
21、lication. you load and execute the vb system just as you do other windows programs. you will use this running vb program to create other programs. vb is just a tool, albeit an extremely powerful tool, that programmers (people who write programs) use to write, test, and run windows applications.altho
22、ugh programmers often use the terms program and application interchangeably (as will be done throughout this 24-hour course), the term application seems to fit the best when youre describing a windows program because a windows program typically consists of several files. these files work together in
23、 the form of a project. the project generates the final program that the user loads and runs from windows by double-clicking an icon or by starting the application with the windows start menu.the role of programming tools has evolved over the past 45 years along with computer hardware. a programming
24、 language today, such as visual basic, differs greatly from programming languages of just a few years ago. the visual nature of the windows operating system requires more advanced tools than were available a few years ago. before windowed environments, a programming language was a simple text-based
25、tool with which you wrote programs. today you need much more than just a language; you need a graphical development tool that can work inside the windows system and create applications that take advantage of all the graphical, multimedia, online, and multiprocessed activities that windows offers. vi
26、sual basic is such a tool. more than a language, visual basic lets you generate applications that interact with every aspect of todays windows operating systems. if youve taken a look at visual basic in the past, youll be amazed at todays visual basic system. vb now sports a true compiler that creat
27、es standalone runtime .exe files that execute more quickly than previous vb programs. vb also includes several wizards that offer step-by-step dialog box questions that guide you through the creation of applications. vbs development platform, a development environment called the developer studio, no
28、w supports the same features as the advanced visual c+ and visual j+ compilers. therefore, once you learn one of microsofts visual programming products, you will have the skills to use the other language products without a long learning curve ahead of you.languagesprogramming languages today are not
29、 what they used to be. the language itself has not gotten less important; rather, the graphical interfaces to applications have gotten more important.a computer cannot understand any persons spoken language. a spoken language, such as italian or english, is simply too general and ambiguous for compu
30、ters to understand. therefore, we must adapt to the machine and learn a language that the computer can understand. vbs programming language is fairly simple and uses common english words and phrases for the most part. the language is not ambiguous, however. when you write a statement in the visual b
31、asic language, the statement never has multiple meanings within the same context.as you progress through the next 24 hours, you will learn more and more of the visual basic languages vocabulary and syntax (grammar, punctuation, and spelling rules). you will use the vb programming language to embed i
32、nstructions within applications you create. all the code you write (code is the programs instructions) must work together to instruct the computer. code is the glue that ties all the graphics, text, and processes together within an application. code tells a checkbook application, for example, how to
33、 be a checkbook application and not something else. the program code lets the application know what to do given a wide variety of possible outcomes and user actions. the vb programming processwhen you want to use visual basic, youll follow these basic steps: 1. start visual basic.2. create a new app
34、lication or load an existing application. when you create a new application, you might want to use visual basics vb application wizard to write your programs initial shell, as youll do in the next hour. 3. test your application with the debugging tools visual basic supplies. the debugging tools help
35、 you locate and eliminate program errors (called bugs) that can appear despite your best efforts to keep them out.4. compile your program into a final application.5. quit visual basic.6. distribute the application to your users. rarely will you perform all these steps sequentially in one sitting. th
36、e six steps are not sequential steps, but stages that you go through and return to before completing your application. starting visual basicyou start visual basic from the windows start menu. the visual basic development environment itself usually appears on a submenu called microsoft visual basic 5
37、.0, although yours might be called something different due to installation differences. you will see additional programs listed on the microsoft visual basic 5.0 submenu, but when you select visual basic 5.0 from the submenu, visual basic loads and appears on your screen.on most systems, figure 1.1s
38、 dialog box appears as soon as you start visual basic. the dialog box lets you start the vb application wizard, edit an existing vb project, or select from a list of recent projects youve worked on, depending on the dialog box tab you click.as you can see at the bottom of the dialog box, you dont ha
39、ve to see the dialog box every time you start visual basic. if you click the option labeled dont show this dialog box in the future, visual basic will not display the opening dialog box when you start visual basic.figure 1.1. the new project dialog box often appears when you start vb. once you close
40、 the dialog box, the regular visual basic screen appears. as figure 1.2 shows, vbs opening screen can get busy! figure 1.2 shows the visual basic development environment, the environment with which you will become intimately familiar soon. from this development environment you will create windows pr
41、ograms. figure 1.2. vbs screen looks confusing at first. although the screen can look confusing, you can fully customize the visual basic screen to suit your needs and preferences. over time, you will adjust the screens window sizes and hide and display certain windows so that your visual basic scre
42、ens start-up state might differ tremendously from that of figure 1.2.待添加的隐藏文字内容2stopping visual basicyoull exit from visual basic and return to windows the same way you exit most windows applications: select file|exit, click visual basics main window close button, press alt+f4, or double-click vbs c
43、ontrol menu icon that appears in the upper-left corner of the screen.if you have made changes to one or more files within the currently open project (remember that a project is the collection of files that comprise your application), visual basic gives you one last chance to save your work before qu
44、itting to windows. mastering the development environmentlearning the ins and outs of the development environment before you learn visual basic is somewhat like learning the parts of an automobile before you learn to drive. if, however, you take the time to learn some of the development environments
45、more fundamental principles, you will be better able to learn visual basic. you then will be more comfortable within vbs environment and will have a better understanding of the related words when subsequent lessons refer to the windows and tools in the development environment.figure 1.3 shows the vi
46、sual basic development environment with many of the more important screen components labeled. as you can see from the menu and toolbar, visual basic looks somewhat like other windows programs on the market. many of visual basics menu bar commands work just as they do in other applications such as mi
47、crosoft word. for example, you can select edit|cut and edit|paste to cut and paste text from one location to another. these same menu bar commands appear on almost every other windows program on the market today. figure 1.3. getting to know the development environment. standards: the menu bar and to
48、olbarvisual basics menu bar and toolbars work just as you expect them to. you can click or press a menu bar options hotkey (for example, alt+f displays the file menu) to see a pull-down list of menu options that provides either commands, another level of menus, or dialog boxes. many of the menu opti
49、ons have shortcut keys (often called accelerator keys) such as ctrl+s for the file|save option. when you press an accelerator key, you dont first have to display the menu to access the option.the toolbar provides one-button access to many common menu commands. instead of selecting edit|paste, for ex
50、ample, you could click the paste toolbar button. as with most of todays windows applications, visual basic supports a wide range of toolbars. select view|toolbars to see a list of available toolbars. each one that is currently showing will appear with a checkmark by its name. the form window: where
51、it all happensthe form window is your primary work area. although the form window first appears small relative to the rest of your screen, the form window comprises the background of your application. in other words, if you write a windows-based calculator with visual basic, the calculators buttons
52、all reside on the form window and when someone runs the calculator, the calculator that appears is really just the applications form window with components placed there and tied together with code. note:you will not see program code on the form window. the form window holds the programs interactive
53、objects, such as command buttons, labels, text boxes, scrollbars, and other controls. the code appears elsewhere in a special window called the code window. the code window does not appear in figure 1.3, but you can select view|code to see the code window. a code window is little more than a text ed
54、itor with which you write the programming statements that tie together the application. consider the sample program running in figure 1.4s window. the window shows a simple dialog box with a few options, text boxes, and command buttons.the programmer who created figure 1.4s dialog box did so by open
55、ing a form window, adding some controls (the items on the form window that interact with the user-sometimes called tools), and tying the components together with some visual basic language code. thats exactly what you will do when writing simple and complex visual basic applications. you will begin
56、with a blank form window and add controls to the form window such as options and command buttons. perhaps your application might even require multiple form windows. note: some applications, such as word, allow for several form windows in a special mode called mdi (multiple-document interface) in whi
57、ch you can open multiple data documents within the same application. an application that requires only a single data window is called an sdi (single-document interface) application, such as the windows notepad application that lets the user open only one data document at a time. sdi applications might support multiple forms; however, these forms do not hold multiple data files but only provide extended support for extra dialog boxes and secondary work screens. source program is code, forms, menus, graphics, and help files that you create and edit to form the proj
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- DB32/T 4594-2023重砂测量技术规程
- 2025年农村污水治理工程项目可行性研究报告
- 高精度绘图仪企业制定与实施新质生产力项目商业计划书
- 高端皮具手工定制企业制定与实施新质生产力项目商业计划书
- 互联网保险定制服务企业制定与实施新质生产力项目商业计划书
- 养生杂粮煎饼铺行业跨境出海项目商业计划书
- 纳米复合高分子膜材料企业制定与实施新质生产力项目商业计划书
- 2025年中国黄蜡石行业市场调研与发展前景评估报告
- 玩水活动营销策划方案模板
- 2025年主管工程领导的述职报告范文(三)
- 2024年江苏省南京市玄武区玄武外国语学校八年级下学期物理期末模拟卷1
- 河砂、碎石组织供应、运输、售后服务方案
- 免疫学实验技术智慧树知到期末考试答案章节答案2024年哈尔滨医科大学大庆校区
- 2024年福建省泉州市惠安县综治网格员招聘173人历年高频考题难、易错点模拟试题(共500题)附带答案详解
- 《城轨通信信号基础设备应》课件-FTGS轨道电路
- 浙江省宁波市镇海区人教PEP版2022年小学毕业考试英语试卷【含答案】
- 中班语言《伞》课件
- 心悸-《中医内科学》教案
- 营区物业服务营区物业服务保密措施
- 托槽粘结医学课件
- 蓝晒创作方案
评论
0/150
提交评论