Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3956

Odd behavior with printing on Windows with x-platform app

$
0
0

With help from this community, I finished my first real app in Xojo:

It lets a warehouse staffer simply type in the SKU of a returned item and print out a CODE-39 barcode to a desktop Dymo label printer, without needing to go into our ERP system.

Label printing is a pain, so the app lets an IT staffer go into Page Setup, set the right paper/label size, orientation, etc. and it saves the settings to a file. So after initial setup by IT, the end user always has the label settings correct. When they print a label, it comes out great… on the Mac where I developed this.

I cross-compiled for Windows, where I need to deploy. The first/worst problem is that when the user clicks the Print button, instead of the Windows OS Print window coming up, this window appears:

It keeps saying Connecting but nothing ever happens. Once you click the Cancel button, it goes away and you see the Windows OS Print window, and you can then print.

What do you think could be triggering this window? It doesn’t appear in any other native Windows apps, so I would think it has to do with my code for printing, which is this:

// print the label
Var g As Graphics
Var pageSetup As PrinterSetup
pageSetup = New PrinterSetup
pageSetup.Settings = App.s
g = pageSetup.ShowPrinterDialog
If g <> Nil Then
  g.FontName = "IDAutomationHC39M Free Version"
  g.FontSize = 12
  // Print bar code label
  g.DrawText(TextArea_BarCode.text,15,50)
end if

9 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 3956

Trending Articles