DebugMode Property

Description:

Setting DebugMode to True results in pop-up error message box for every occurrence of error in mCore™. The pop-up error message box displays the values of ErrorCode and ErrorDescription property in case of any error. If DebugMode is set to false the error message box is not displayed but the ErrorCode and ErrorDescription property and IsError method still indicate the errors.

   

Usage ObjectName.DebugMode = blnDebugMode
Value Type Boolean
Access Mode Write
Valid Values
  • True - Displays error message box for every error occurrence
  • False - Does not display the error message box
Default Value False
Remarks
  • To selectively control the display of error message box use the ShowMsgBox parameter of IsError method.
  • To customize the title of the error message box, use IsError method with MsgBoxTitle parameter.

Usage Example:

Visual Basic / ASP (VBScript)
Dim objSMS As mCore.SMS
Set objSMS = New mCore.SMS
' You can also use Set objSMS = CreateObject("mCore.SMS")
' In case of ASP (VBScript) to create object use
' Set objSMS = Server.CreateObject("mCore.SMS")
' In ASP use Response.Write instead of MsgBox
objSMS.DebugMode = True
' The following line deliberately sets a unacceptable
' value to demonstrate DebugMode
objSMS.Port = "COM35"
objSMS.BaudRate = 57600
objSMS.Parity = "N"
objSMS.DataBits = 8
objSMS.StopBits = "1"
If objSMS.Connect Then
     MsgBox "Connected Successfully!"
Else
     MsgBox "Error " & CStr(objSMS.ErrorCode) & _
            ": " & objSMS.ErrorDescription
End If
' Disconnect method is executed internally
' whenever the SMS object is terminated.
Set objSMS = Nothing

  

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved