public static string GetCodeMessage(TwainExceptionCode code)
public:static String^ GetCodeMessage(TwainExceptionCode code)
def GetCodeMessage(self,code):
code
A TwainExceptionCode value to get the string message for.
A String that contains the current message for code
By default, TwainException has a string message for each TwainExceptionCode. You can get this message by calling this method. Moreever, you can change any string message for any TwainExceptionCode by using the SetCodeMessage method.
using Leadtools;using Leadtools.Twain;public void SetCodeMessageExample(){// Get the initial FileFormat messageTwainExceptionCode code = TwainExceptionCode.StopScan;string message = TwainException.GetCodeMessage(code);MessageBox.Show(string.Format("Code: {0}, message: {1}", code, message));// make sure that this message is used nowtry{throw new TwainException(code);}catch (Exception ex){MessageBox.Show(ex.Message);}// change this message to a custom oneTwainException.SetCodeMessage(code, "My new message");// make sure that this new message is used nowtry{throw new TwainException(code);}catch (Exception ex){MessageBox.Show(ex.Message);}}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
