ALTADataSet.HideCalculationProgress: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:APIClass|ALTAEvents Class|ALTAEvents}}
{{Template:API}}{{Template:APIBreadcrumb|.[[ALTADataSet Class|ALTADataSet]]}}
{{Template:WeibullEvents.HideCalculationProgress.Cmt}}
 
 
<onlyinclude>Occurs when the calculation process is running. Hides the progress bar.</onlyinclude>
 
 
{{Template:API_EventsNote}}


== Syntax ==
== Syntax ==
<ul><li>
'''_HideCalculationProgress'''()
HideCalculationProgress(
 
{{APIName|sender}}
{{APIPrefix|As}}
{{APIName|[[ALTADataSet Class|ALTADataSet]]}})
</li></ul>


Parameters
== Example ==
:''sender'': An [[ALTADataSet Class|ALTADataSet]] object.
The following example provides a simple demonstration on how to customize the event procedure.
'''VBA'''
{{APIComment|'Specify a variable to handle the event.}}
  {{APIPrefix|Private WithEvents}} ads {{APIPrefix|As}} ALTADataSet
{{APIComment|'----------------------------}}
  {{APIPrefix|Sub}} Main()
  {{APIComment|'Associate the event variable with an object.}}
    {{APIPrefix|Set}} ads = {{APIPrefix|New}} ALTADataSet
  {{APIComment|'Set the application to use your event procedure.}}
    ads.UseEvents = True
  {{APIComment|'Define a stress type with a use stress level of 300.}}
    {{APIPrefix|Call}} ads.AddStressDefinition({{APIString|"Stress1"}}, , 300) 
  {{APIComment|'To trigger the event, analyze a data set.}}
    {{APIPrefix|Call}} ads.AddFailure_2(245, 1, 353)
    {{APIPrefix|Call}} ads.AddFailure_2(110, 1, 373)
    {{APIPrefix|Call}} ads.AddFailure_2(180, 1, 373) 
    {{APIPrefix|Call}} ads.AddFailure_2(50, 1, 393)
    {{APIPrefix|Call}} ads.AddFailure_2(70, 1, 393)
    ads.Calculate
    Msgbox({{APIString|"End"}})
  {{APIPrefix|End Sub}}
{{APIComment|'----------------------------}}
  {{APIPrefix|Private Sub}} ads_HideCalculationProgress()
  {{APIComment|'<Add code here to handle the event.>}}
    MsgBox ("HideCalculationProgress event")
  {{APIPrefix|End Sub}}


== Usage Example ==
'''VB.NET'''
This example demonstrates how to hide the calculation progress display.
   {{APIComment|'Overrides requested, create a new class, inherit WeibullEvents, and set the dataset's events.}}
{{APIComment|'Specify a variable to handle the event.}}
  Private Class myEvents
  {{APIPrefix|Private WithEvents}} ads {{APIPrefix|As}} ALTADataSet
      Inherits WeibullEvents
      Public Overrides Sub ShowCalculationProgress(sender As ALTADataSet)
{{APIComment|'----------------------------}}
          MyBase.ShowCalculationProgress(sender)
   {{APIPrefix|Sub}} Main()
          {{APIComment|'<Additional overridden code here.>}}
  {{APIComment|'Associate the event variable with an object.}}
      End Sub
    ads = {{APIPrefix|New}} ALTADataSet
   End Class
 
  {{APIComment|'Set the application to use your event procedure.}}
  {{APIComment|'Set the new Events class.}}
    ads.UseEvents = True
   ADS.Events = New myEvents
 
  {{APIComment|'Define a stress type with a use stress level of 300.}}
  {{APIComment|'Show calculation progress.}}
    ads.AddStressDefinition({{APIString|"Stress1"}}, , 300) 
  ADS.Events.ShowCalculationProgress(ADS)
  {{APIComment|'To trigger the event, analyze a data set.}}
    ads.AddFailure(245, 1, 353)
    ads.AddFailure(110, 1, 373)
    ads.AddFailure(180, 1, 373) 
    ads.AddFailure(50, 1, 393)
    ads.AddFailure(70, 1, 393)
    ads.Calculate
    Msgbox({{APIString|"End"}})
   {{APIPrefix|End Sub}}
{{APIComment|'----------------------------}}
   {{APIPrefix|Private Sub}} ads_HideCalculationProgress() {{APIPrefix|Handles}} ads.HideCalculationProgress
  {{APIComment|'<Add code here to handle the event.>}}
    MsgBox ("HideCalculationProgress event")
  {{APIPrefix|End Sub}}

Latest revision as of 23:43, 6 September 2016

APIWiki.png


Member of: SynthesisAPI.ALTADataSet


Occurs when the calculation process is running. Hides the progress bar.


Remarks: To hide the messages or write your own code for the event procedure, set the UseEvents property of the object to True. The event is raised by the class methods.

Syntax

_HideCalculationProgress()


Example

The following example provides a simple demonstration on how to customize the event procedure.

VBA

 'Specify a variable to handle the event. 
  Private WithEvents ads As ALTADataSet

 '---------------------------- 
 Sub Main()
   'Associate the event variable with an object. 
    Set ads = New ALTADataSet

   'Set the application to use your event procedure. 
    ads.UseEvents = True

   'Define a stress type with a use stress level of 300. 
    Call ads.AddStressDefinition("Stress1", , 300)  

   'To trigger the event, analyze a data set. 
    Call ads.AddFailure_2(245, 1, 353)
    Call ads.AddFailure_2(110, 1, 373)
    Call ads.AddFailure_2(180, 1, 373)  
    Call ads.AddFailure_2(50, 1, 393)
    Call ads.AddFailure_2(70, 1, 393)

    ads.Calculate
    Msgbox("End")

 End Sub

 '---------------------------- 
 Private Sub ads_HideCalculationProgress()
   '<Add code here to handle the event.> 
    MsgBox ("HideCalculationProgress event")
 End Sub
VB.NET

 'Specify a variable to handle the event. 
  Private WithEvents ads As ALTADataSet

 '---------------------------- 
 Sub Main()
   'Associate the event variable with an object. 
    ads = New ALTADataSet

   'Set the application to use your event procedure. 
    ads.UseEvents = True

   'Define a stress type with a use stress level of 300. 
    ads.AddStressDefinition("Stress1", , 300)  

   'To trigger the event, analyze a data set. 
    ads.AddFailure(245, 1, 353)
    ads.AddFailure(110, 1, 373)
    ads.AddFailure(180, 1, 373)  
    ads.AddFailure(50, 1, 393)
    ads.AddFailure(70, 1, 393)

    ads.Calculate
    Msgbox("End")

 End Sub

 '---------------------------- 
 Private Sub ads_HideCalculationProgress() Handles ads.HideCalculationProgress
   '<Add code here to handle the event.> 
    MsgBox ("HideCalculationProgress event")
 End Sub