毕业设计(论文)外文资料翻译题目:ActiveXandVBAReference院系名称:专业班级:学生姓名:学号:指导教师:教师职称:起止日期:地点:原文ActivateeventTriggeredwhenadocumentwindowisactivated.SeeAlso|ExampleSignatureobject.Activate()objectDocumentobjectAnobjectexpressionthatevaluatestoavalidcontainerobject.Inthiscase,theonlyvalidcontainerisadocument.RemarksNoeventswillbefiredwhileamodaldialogisbeingdisplayed.SeeAlsoMethods,Properties,andEvents:AppActivateWindowMovedOrResizedActiveXandVBADeveloper'sGuide:UseEventsExamplePrivateSubAcadDocument_Activate()'ThisexampleinterceptsadrawingActivateevent.''Thiseventistriggeredwhenadrawingwindowbecomesactive.''Totriggerthisexampleevent:EitheropenanewdrawingorswitchfromonedrawingwindowtoanotherMsgBoxYouhavejustactivatedadrawing!EndSubAppActivateEventTriggeredjustbeforethemainapplicationwindowisactivated.SeeAlso|ExampleSignatureobject.AppActivate()objectApplicationAnobjectexpressionthatevaluatestoavalidcontainerobject.Inthiscase,theonlyvalidcontaineristheapplication.RemarksNoeventswillbefiredwhileamodaldialogisbeingdisplayed.SeeAlsoMethods,Properties,andEvents:AppDeactivateWindowMovedOrResizedActiveXandVBADeveloper'sGuide:UseEventsExamplePublicWithEventsACADAppAsAcadApplication'UsewithApplicationEventExamplesSubExample_AcadApplication_Events()'Thisexampleinitializesthepublicvariable(ACADApp),whichwillbeusedtointerceptAcadApplicationEvents''TheVBAWithEventsstatementmakesitpossibletointerceptagenericobjectwiththeeventsassociatedwiththatobject.''BeforeyouwillbeabletotriggeranyoftheAcadApplicationevents,youwillneedtorunthisprocedure.'WecouldgettheapplicationfromtheThisDocumentobject,butthatwouldrequirehavingadrawingopen,sowegetitfromthesystem.SetACADApp=GetObject(,AutoCAD.Application.16)EndSubPrivateSubACADApp_AppActivate()'ThisexampleinterceptsanApplicationAppActivateevent.''ThiseventistriggeredwhentheAutoCADapplicationreceivesfocus''Totriggerthisexampleevent:'1)Makesuretoruntheexamplethatinitializes'thepublicvariable(namedACADApp)linkedtothisevent.''2)SwitchfocusfromAutoCADtoanotherWindowsapplicationandthenbackagain.MsgBoxAutoCADwasjustactivated!EndSubAppDeactivateeventTriggeredjustbeforethemainapplicationwindowisdeactivated.SeeAlso|ExampleSignatureobject.AppDeactivate()objectApplicationAnobjectexpressionthatevaluatestoavalidcontainerobject.Inthiscase,theonlyvalidcontaineristheapplication.RemarksNoeventswillbefiredwhileamodaldialogisbeingdisplayedSeeAlsoMethods,Properties,andEvents:AppActivateWindowMovedOrResizedActiveXandVBADeveloper'sGuide:UseEventsExamplePublicWithEventsACADAppAsAcadApplication'UsewithApplicationEventExamplesSubExample_AcadApplication_Events()'Thisexampleinitializesthepublicvariable(ACADApp),whichwillbeusedtointerceptAcadApplicationEvents.''TheVBAWithEventsstatementmakesitpossibletointerceptagenericobjectwiththeeventsassociatedwiththatobject.''BeforeyouwillbeabletotriggeranyoftheAcadApplicationevents,youwillfirstneedtorunthisprocedure.'WecouldgettheapplicationfromtheThisDocumentobject,butthatwouldrequirehavingadrawingopen,sowegetitfromthesystem.SetACADApp=GetObject(,AutoCAD.Application.16)EndSubPrivateSubACADApp_AppDeactivate()'ThisexampleinterceptsanApplicationAppDeactivateevent.''ThiseventistriggeredwhentheAutoCADapplicationlosesfocus''Totriggerthisexampleevent:'1)Makesuretoruntheexamplethatinitializes'thepublicvariable(namedACADApp)linkedtothisevent.''2)SwitchfocusfromAutoCADtoanotherWindowsapplication.MsgBoxAutoCADjustlostfocus!EndSubARXLoadedeventTriggeredwhenanObjectARXapplicationhasbeenloaded.SeeAlso|ExampleSignatureobject.ARXLoaded(FullPathName)objectApplicationAnobjectexpressionthatevaluatestoavalidcontainerobject.Inthiscase,theonlyvalidcontaineristheapplication.FullPathNameStringThefullpathandfilenameoftheObjectARXapplicationthathasbeenloaded.RemarksNoeventswillbefiredwhileamodaldialogisbeingdisplayedSeeAlsoMethods,Properties,andEvents:ARXUnloadedActiveXandVBADeveloper'sGuide:UseEventsExamplePublicWithEventsACADAppAsAcadApplication'UsewithApplicationEventExamplesSubExample_AcadApplication_Events()'Thisexampleinitializesthepublicvariable(ACADApp),whichwillbeusedtointerceptAcadApplicationEvents.''TheVBAWithEventsstatementmakesitpossibletointerceptagenericobjectwiththeeventsassociatedwiththatobject.''BeforeyouwillbeabletotriggeranyoftheAcadApplicationevents,youwillfirstneedtorunthisprocedure.'WecouldgettheapplicationfromtheThisDocumentobject,butthatwouldrequirehavingadrawingopen,sowegetitfromthesystem.SetACADApp=GetObject(,AutoCAD.Application.16)EndSubPrivateSubACADApp_ARXLoaded(ByValAppNameAsString)'ThisexampleinterceptsanApplicationARXLoadedevent.'ThiseventistriggeredwhenAutoCADloadsanObjectARXapplication.''Totriggerthisexampleevent:'1)Makesuretoruntheexamplethatinitializes'thepublicvariable(namedACADApp)linkedtothisevent.''2)LoadanARXapplicationintoAutoCAD.'UsetheAppNamevariabletonotifytheuserwhichARXapplicationwasloadedMsgBoxAutoCADjustloadedtheARXapplication:&AppNameEndSubARXUnloadedeventTriggeredwhenanObjectARXapplicationhasbeenunloaded.SeeAlso|ExampleSignatureobject.ARXUnloaded(FullPathName)objectAp