理解对象、属性和方法-------英文文献及译文.doc

约10页DOC格式手机打开展开

理解对象、属性和方法-------英文文献及译文,object, attribute and method are understoodthe object is the structure foundation of visual basic, and all operations being in progress in visual basic are almo...
编号:16-256498大小:45.00K
分类: 论文>外文翻译

内容介绍

此文档由会员 wanli1988go 发布

Object, attribute and method are understood
The object is the structure foundation of Visual Basic, and all operations being in progress in Visual Basic are almost all related with the modification object. Like civilian shelves, table, paragraph, title label pasted on the cover of a thread-bound book and land within certain boundaries etc, all the object among the available Visual Basic is expressed the any element of Microsoft WORD. What is object and gathering? The object represents WORD's element, like the character of civilian shelves, paragraph, title label pasted on the cover of a thread-bound book or alone. Gathering also is an object, and this object contains many other objects, usually these objects belong to the identical type; Such as, one is gathered in the object can to contain all title label pasted on the cover of a thread-bound book objects in the civilian shelves. By way of using attribute and method, the object can revised by oneself also can be revised the whole object gathering. What is the attribute?
The attribute is the one kind of specific property of object or an aspect of this object action. Such as, the civilian shelves attributies contain his name, content, preserve the state as well as whether or not to start using the revision. His attribute value can be revised as if changing the characteristic of object.


理解对象、属性和方法
对象是 Visual Basic 的结构基础,在 Visual Basic 中进行的所有操作几乎都与修改对象有关。Microsoft WORD 的任何元素,如文档、表格、段落、书签、域等,都可用 Visual Basic 中的对象来表示。
什么是对象和集合?
对象代表一个 WORD 元素,如文档、段落、书签或单独的字符。集合也是一个对象,该对象包含多个其他对象,通常这些对象属于相同的类型;例如,一个集合对象中可包含文档中的所有书签对象。通过使用属性和方法,可以修改单独的的对象,也可修改整个的对象集合。
什么是属性?
属性是对象的一种特性或该对象行为的一个方面。例如,文档属性包含其名称、内容、保存状态以及是否启用修订。若要更改一个对象的特征,可以修改其属性值。
若要设置属性的值,可在对象的后面紧接一个句号、属性名称、一个等号及新的属性值。下列示例在名为“MyDoc.doc”的文档中启用修订。
Sub TrackChanges()
Documents("Sales.doc").TrackRevisions = True
End Sub
在本示例中,Documents 引用由打开的文档构成的集合,而“MyDoc.doc”标识集合中单独的文档。并设置该文档的 TrackRevisions 属性。
不能设置某些属性。属性的“帮助”主题中会标明可以设置该属性(可读写),或只能读取该属性(只读)。