search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Printing Schedule using VB

Asked by Mark Lyons
13 years ago.
I see that it is possible to print to a PNG file using C. I don't see how to do this with Visual Basic. Can someone help me with this? Thanks, Mark
Comment posted by Bbq
13 years ago.
I would like to know too because this is a feature i would like to implement
Comment posted by Mark Lyons
13 years ago.
Ok, I figured this out on my own.... Make sure you have these namespaces: System.Data System.IO System.Drawing.Image Then add a button and insert this sub.... Protected Sub ButtonExport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Response.AddHeader("content-disposition", "attachment;filename=print.png") Dim ms As New MemoryStream Response.Clear() Response.ContentType = "image/png" Response.AddHeader("content-disposition", "attachment;filename=print.png") ms = DayPilotScheduler1.Export(Drawing.Imaging.ImageFormat.Png) ms.WriteTo(Response.OutputStream) Response.End() End Sub
Comment posted by Bbq
13 years ago.
Good Job Mark Thanks!
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.