(11.3.1)--9.2Propertiesandmethodsofcontrol.ppt

上传人:刘静 文档编号:84102459 上传时间:2023-04-01 格式:PPT 页数:15 大小:1.66MB
返回 下载 相关 举报
(11.3.1)--9.2Propertiesandmethodsofcontrol.ppt_第1页
第1页 / 共15页
(11.3.1)--9.2Propertiesandmethodsofcontrol.ppt_第2页
第2页 / 共15页
点击查看更多>>
资源描述

《(11.3.1)--9.2Propertiesandmethodsofcontrol.ppt》由会员分享,可在线阅读,更多相关《(11.3.1)--9.2Propertiesandmethodsofcontrol.ppt(15页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、Properties and methods of control object数据库技术与程序设计Properties of control objectProperties of control objectThe Properties of an object describe the static characteristics of the object.buttonbuttontitletitlenamenamebackground background colorcolorheightheightwidthwidthProperties are inherent characte

2、ristics of an object,which can be understood as variables belonging to an object.When creating an object,these variables are assigned.数据库技术与程序设计Properties of control objectThe general format of an Attribute definition statement is:.name=Attribute value=Attribute valueIn In most most cases,cases,the

3、the set name represents represents the the container container to to which which the the current current object object belongs,belongs,such such as form,report,and so on.as form,report,and so on.数据库技术与程序设计Properties of control objectThe general format of the property definition statement is:Me.Comma

4、nd0.Caption=OK Me.Command0.ForeColor=RGB(255,0,0)Me.Command0.Height=600 Me.Command0.Width=1000 数据库技术与程序设计Methods for control objectMethods for control objectMethods for control objectObject methods are also called object member functions,in object-oriented programming,methods can be understood as th

5、e code that enables the object to complete a certain action,which can be directly called in the program.The general format of methods calling code is:.object name.method name.object name.method nameParameter tableParameter table Move the button object Command0 500 units away from the left border of

6、the formMe.Command0.Move(500)数据库技术与程序设计Methods for control objectIllustrate some methods of a few controlsobjectobjectmethodmethodExplanationExplanationForm member methodGoToPageMove focus to the first control on the specified page of the active formMoveMove the form object to the coordinates specif

7、ied by the parameter valueRefreshUpdate forms or datasheets immediatelyTextbox member methodMoveMove the text box to the coordinates specified by the parameter valueRequeryRequery the data source of the text box,and the data on the text box will be updatedLabel member methodMoveMove the label to the

8、 coordinate specified by the parameter valueSizeToFitResize the label control to fit the text or what it contains数据库技术与程序设计Partial member method of DoCmd objectmethodExplanationExplanationCloseIn VBA,close the current object,including forms,reports,queries,and moreCloseDatabaseClose the current data

9、baseCopyObjectCopy an objectDeleteObjectDelete an objectOpenFormOpen formOpenQueryOpen queryOpenReportOpen reportOpenTableOpen the datasheetPrintOutPrint or outputQuitBefore exiting Access 2016,you can choose to save database objects and their dataRunSQLEmbed some SQL statements into the VBA program

10、 to runSaveUpdate and write the data of the current object to the databaseSetFilterFilter active data tables,forms,reports and recorded applications in tablesSetParameterCreate parameters for OpenForm,OpenQuery,OpenReport and other methodsControl object events数据库技术与程序设计Concept of eventEach object ca

11、n recognize and respond to a specific operation action or environmental state change.This specific user operation action or state change is called an event.数据库技术与程序设计Concept of eventIn object-oriented programming,an event is a pre-defined specific action that is activated by the user or the system.S

12、ingle click to trigger Click eventSingle click to trigger Click eventDouble click to trigger DblClick eventDouble click to trigger DblClick eventUsers can code the process of certain events in advance.When an event occurs,the process code of the corresponding event of the object will be executed.数据库

13、技术与程序设计The demonstration数据库技术与程序设计Concept of eventCode the Click event for the button Command0数据库技术与程序设计Concept of eventEdit the Click event codeMe.Command0.Caption=“determine Me.Command0.ForeColor=RGB(255,0,0)Me.Command0.Height=600 Me.Command0.Width=1000 Mmand0.move(500)数据库技术与程序设计Concept of eventbefore and after button click Form 1Form 1Determine数据库技术与程序设计The end of demonstration

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 大学资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁