OpenPrinterDialog on Lion 10.7.5

Hello all!
I have a problem: in one of my app, i have this code in a button (only this in my app):

Dim g As Graphics g = OpenPrinterDialog If g <> Nil Then g.DrawString("Hello World", 100, 100) End If

All works fine, but, if I sandbox my app and I run in on a 10.7.5, the app crashes! No exception, no coding errors… it simply quits unexpected.

When I sign and sandbox my app, I check the “print” and “network client” privileges (I use AppWrapper).

My sandboxed app works fine in 10.8.x and 10.9.x.

Anyone has suggetions!

Many thanks!

I add this info: if I use this code, it works… but the window is not shown…

Dim g As Graphics g = OpenPrinter If g <> Nil Then g.DrawString("Hello World", 100, 100) End If