vb.net - vb - I am trying to print other form but this happens: -
(this first post correct me if i'm doing wrong.)
here bit of code:
imp.id.text = globalvars.mdataset.tables("table1").rows(0).item("id") imp.date.text = globalvars.mdataset.tables("table1").rows(0).item("date") imp.hour.text = globalvars.mdataset.tables("table1").rows(0).item("hour").tostring imp.printform1.printersettings.defaultpagesettings.margins = new printing.margins(10, 10, 10, 10) imp.show() imp.focus() imp.printform1.printaction = printing.printaction.printtopreview imp.printform1.print() and happens when gives me preview page empty... weird thing when place msgbox before printing action, preview goes right , shows me want print.... tips?
edit: imp form printform is
try add ..
.... application.doevents imp.printform1.print()
Comments
Post a Comment