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

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -