[ Pobierz całość w formacie PDF ]
.See also End, Pause, Resume, Run propertyChange EventSyntax Sub SaxBasicPro1_Change ( )Applies to OCX and VBXDescription Indicates that the Caption or the Code property may have changed.Remarks Use this event to keep the title of the form in sync with the name of thefile in the IDE.See also Caption property, Changed property, Code property, FileName propertyCloseSheet EventSyntax Sub SaxBasicPro1_CloseSheet (Sheet As Integer, Cancel As Integer)Applies to OCX onlyDescription Indicates that a modified macro/module might need to be saved.Implement this event if" FileTools is False and you want to protect modifications that the userhas made.82 / Chapter 7" You are using GetMacroName, ReadMacro and WriteMacro to storemacros/modules somewhere besides the file system.Remarks The last parameter Cancel indicates what action Sax Basic Engine shouldtake." False - The macro/module code has been saved or can be discarded." True - Terminate the operation that is trying to close the sheet." other - Let Sax Basic Engine decide what to do.If FileTools if True,the user will be asked if the changes should be saved.Otherwise, themacro/module code will be discarded.See also GetMacroName, ReadMacro, WriteMacroDebugPrint EventDeclaration Sub SaxBasicPro_DebugPrint (Text As String)Applies to OCX and VBXDescription Indicates that the macro instruction Debug.Print was encountered.Remarks The Text$ parameter contains the text to be printed.DoEvents EventSyntax Sub SaxBasicPro1_DoEvents ( )Applies to OCX and VBXDescription This event is triggered about 18 times per second while a macro/moduleis executing.Simply calling Visual Basic s DoEvents function lets youallow other applications, as well as your own, to process messages andmultitask while a macro/module is running.Remarks This event should always be written exactly as follows:Event Reference / 83Sub SaxBasicPro1_DoEvents ( )DoEventsEnd SubEnd EventSyntax Sub SaxBasicPro1_End ( )Applies to OCX onlyDescription This event is triggered when execution has completed.Remarks When this event is triggered, the Run property will be False and thePause property will be False.See also Begin, Pause, Resume, Run propertyErrorAlert EventSyntax Sub SaxBasicPro1_ ErrorAlert ( )Applies to OCX and VBXDescription This event is triggered if an error has occurred.The error can be a syntaxerror or a runtime error.Evaluation errors do not trigger this event.Remarks You can use the ErrorFile, ErrorLine, and ErrorText properties todetermine the nature of the error.If the ErrorText$ property is not a nullstring, then you can use it as a warning message to the user.See also ErrorFile property, ErrorLine property, ErrorOffset property, ErrorTextpropertyFileExit EventSyntax Sub SaxBasicPro1_FileExit ( )Applies to OCX only84 / Chapter 7Description This event is triggered when the user selects the Exit item in the Filemenu.Remarks This event must be defined if FileMenuVisible is True.If Sax BasicEngine is on an MDI child form, write the FileExit event this way:Sub SaxBasicPro1_FileExit ( )Unload MDIForm1End SubIf the Engine is on a form by itself, you might want File|Exit to tell theform to go away:Sub SaxBasicPro1_FileExit ( )Unload MeEnd SubOr, you might use File|Exit to hide the form:Sub SaxBasicPro1_FileExit ( )Visible = FalseEnd SubGetMacroCaption EventSyntax Sub SaxBasicPro1_GetMacroCaption (MacroCaption As String)Applies to OCX onlyDescription Returns the caption of the macro/module.Remarks The MacroCaption$ parameter provides the macro/module name.If themacro/module name is a special name for your application, change it tothe macro/module s caption.Otherwise, do nothing.Event Reference / 85GetMacroName EventSyntax Sub SaxBasicPro1_GetMacroName (FileName As String, _,OpenDialog As Boolean, _, As Integer)Applies to OCX onlyDescription Indicates that a macro/module name is required for a File Open or Saveoperation.Implement this event if you are going to store macros/modulessomewhere other than in the file system.Remarks The first parameter, FileName$, returns the name of the macro/moduleselected by the user.If the macro/module name is not a file, it must beginwith *.The second parameter, OpenDialog, is True for an Open dialogand False for a Save dialog.The last parameter, Cancel, indicates whataction Sax Basic Engine should take." False - The name of the macro/module has been returned inFileName$." True - Terminate the operation that is getting a macro/module name." other - Sax Basic Engine displays a standard File Open or Save dialog.See also CloseSheet, ReadMacro, WriteMacroHelp EventSyntax Sub SaxBasicPro1_ Help (Text As String)Applies to OCX and VBXDescription This event is triggered if the F1 (Help) key has been pressed while theuser is inside the IDE.The Help event enables the application to displaycontext-sensitive help for language keywords.Remarks The single parameter Text$, which is passed to the Help event, is part ofthe extended syntax that was added to the language.You should showHelp for this keyword here.Set Text$ to to prevent the standard Helpfile from being searched
[ Pobierz całość w formacie PDF ]