vb.net - Printform Dialogbox Appears In PrintPreview -


i created app calculation of hvac equipment. ok (my last question in app) i'm facing new problem. when click print button , select printer, print preview dialog shows me printer selection dialog's traces.preview of document

i tried sleep function @ different rows doesn't work. how can fix app ? here code:

private sub button1_click(sender object, e eventargs) handles button1.click     button1.visible = false     combobox1.visible = false      printdialog1.printersettings = printform1.printersettings     printdialog1.allowsomepages = true     if printdialog1.showdialog = dialogresult.ok          thread.sleep(3000)          me.printform1             printform1.printersettings = printdialog1.printersettings             .printaction = printing.printaction.printtopreview              dim mymargins new margins              mymargins                 .left = 40                 .right = 40                 .top = 40                 .bottom = 40             end              .printersettings.defaultpagesettings.margins = mymargins              printform1.documentname = notasyon_lbl.text              .print(me, powerpacks.printing.printform.printoption.compatiblemodeclientareaonly)          end      end if      me.close() end sub 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -