WeibullDataSet.Question: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 29: Line 29:
== Usage Example ==
== Usage Example ==


{{APIComment|'Overrides requested. Create a new class and inherit WeibullEvents. Then set the dataset's events.}}
  Private Class myEvents
      Inherits WeibullEvents
      Public Overrides Sub Question(sender As WeibullDataSet, sMsg As String, Buttons As MsgBoxStyle, ByRef Answer As MsgBoxResult)
          MyBase.Question(sender, sMsg, Buttons, Answer)
            {{APIComment|'(Add additional code.)}}
      End SubEnd Class
 
{{APIComment|'Set the new Events class}}
  WDS.Events = New myEvents
 
{{APIComment|'Ask a question. Result will be updated in Answer.}}
  WDS.Events.Question(WDS, "Continue?", MsgBoxStyle., Answer)
<!--
{{APIComment|Declare a New class that Inherits from WeibullEvents.}}<br>
{{APIComment|Declare a New class that Inherits from WeibullEvents.}}<br>
{{APIComment|Override the method.}}<br>
{{APIComment|Override the method.}}<br>
Line 52: Line 72:
{{APIComment|Prompts user with "Question1" and returns result in MsgBoxResult1.}}
{{APIComment|Prompts user with "Question1" and returns result in MsgBoxResult1.}}
         WDS.Events.Question(WDS, "Question1", MsgBoxStyle1, MsgBoxResult1)
         WDS.Events.Question(WDS, "Question1", MsgBoxStyle1, MsgBoxResult1)
-->

Revision as of 18:01, 1 April 2014


Called when an answer to a question is required. Displays a prompt and returns the result.

Syntax

  • Question( sender As WeibullDataSet, sMsg As String , Buttons As MsgBoxStyle, Answer As MsgBoxResult)

Parameters

sender: A WeibullDataSet object.
sMsg: The main display label.
Buttons: The MsgBoxStyle that determines the number and display of the buttons. See MsgBoxStyle for additional details.
Answer: The MsgBoxResult that is returned by the prompt. See MsgBoxResult for additional details.

Usage Example

 'Overrides requested. Create a new class and inherit WeibullEvents. Then set the dataset's events. 
 Private Class myEvents
     Inherits WeibullEvents
     Public Overrides Sub Question(sender As WeibullDataSet, sMsg As String, Buttons As MsgBoxStyle, ByRef Answer As MsgBoxResult)
         MyBase.Question(sender, sMsg, Buttons, Answer)
             '(Add additional code.) 
     End SubEnd Class
 
 'Set the new Events class 
 WDS.Events = New myEvents
 
 'Ask a question. Result will be updated in Answer. 
 WDS.Events.Question(WDS, "Continue?", MsgBoxStyle., Answer)