SetPrinterUISettings Example for Visual Basic

Private Sub SetPrinterUISettings_Click()
   Const TEST_PRINTER_NAME = "Test Printer Name"
   Dim ePrint As New ePrint
   Dim UISettings  As New EpnUISettings
   
   If ePrint.IsSupportLocked (SUPPORT_OEM) Then
      ePrint.UnlockSupport SUPPORT_OEM, OEM_KEY
   End If
   
   UISettings.AboutString = "about string"
   UISettings.AboutIcon = "C:\Program Files\OEM eprint\ICON.ICO"
   UISettings.ShowOptions = HIDE_PAPER_TAB Or HIDE_GRAPHICS_TAB
   UISettings.FormatsCount = 4
   
   UISettings.SaveFormats (0).DocumentType = FT_SAVE_TYPE_RASTER
   UISettings.SaveFormats(0).Format = FILE_CMP
   
   UISettings.SaveFormats(1).DocumentType = FT_SAVE_TYPE_RASTER
   UISettings.SaveFormats(1).Format = FILE_JFIF
   
   UISettings.SaveFormats(2).DocumentType = FT_SAVE_TYPE_VECTOR
   UISettings.SaveFormats(2).Format = FILE_EMF
   
   UISettings.SaveFormats(3).DocumentType = FT_SAVE_TYPE_RASTER
   UISettings.SaveFormats(3).Format = FILE_PDF

   ePrint.SetPrinterUISettings TEST_PRINTER_NAME, UISettings
End Sub