|
|
(9 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| =DRAFT=
| | DRAFT |
| | |
| | |
| Occurs when the <code>Calculate</code> or <code>CalculateBestFit</code> method is called but no data set has been defined. The application is unable to calculate the parameters when there is no data.
| |
| | |
| == Syntax ==
| |
| '''_Message'''({{APIPrefix|ByVal}} ''msg'' {{APIPrefix|As String}}, {{APIPrefix|ByVal}} ''IsCritical'' {{APIPrefix|As Boolean}})
| |
| | |
| ===Parameters===
| |
| ''msg''
| |
| : The main display label.
| |
| ''IsCritical''
| |
| : Indicates whether the message displayed is critical.
| |
| | |
| | |
| == Example ==
| |
| | |
| '''VBA'''
| |
|
| |
| {{APIPrefix|Private WithEvents}} wds {{APIPrefix|As}} WeibullDataSet
| |
|
| |
| {{APIPrefix|Sub}} Main()
| |
| {{APIComment|'Associate the event with an object.}}
| |
| {{APIPrefix|Set}} wds = {{APIPrefix|New}} WeibullDataSet
| |
|
| |
| {{APIComment|'Set the API to use custom events.}}
| |
| wds.UseEvents = True
| |
|
| |
| {{APIComment|'Call the Calculate method without defining a data set. }}
| |
| wds.Calculate
| |
| Msgbox({{APIString|"End"}})
| |
| {{APIPrefix|End Sub()}}
| |
|
| |
| {{APIPrefix|Private Sub}} wds_Message({{APIPrefix|ByVal}} Msg {{APIPrefix|As String}}, {{APIPrefix|ByVal}} IsCritical {{APIPrefix|As Boolean}})
| |
| {{APIComment|'Add custom code here to handle the event.}}
| |
| {{APIComment|'...}}
| |
| {{APIComment|'...}}
| |
| MsgBox ({{APIString|"Custom event procedure working."}})
| |
| {{APIPrefix|End Sub}}
| |
| | |
| | |
| | |
| | |
|
| |
| {{APIComment|'Create a new class and inherit WeibullEvents.}}
| |
| Private Class myEvents
| |
| Inherits WeibullEvents
| |
| {{APIComment|'Request overrides.}}
| |
| Public Overrides Sub Message(sender As WeibullDataSet, sMsg As String, AdditionalInfo As String, IsCritical As Boolean)
| |
| MyBase.Message(sender, sMsg, AdditionalInfo, IsCritical)
| |
| {{APIComment|'<Add additional code here.>}}
| |
| End Sub
| |
| End Class
| |
|
| |
| {{APIComment|'Declare a new WeibullDataSet.}}
| |
| Dim WDS as New WeibullDataSet
| |
|
| |
| {{APIComment|'Use the created myEvents class in place of the one created by the dataset.}}
| |
| WDS.Events = New myEvents
| |
|
| |
| {{APIComment|'Show a prompt with the respective strings. The additional code will also run.}}
| |
| WDS.Events.Message(WDS, "Message1", "AdditionalInfo1", False)
| |