wildfire1982 Posted December 15, 2003 Posted December 15, 2003 (edited) Hello folks. I am attempting to print a graph in vb.net. Its all going well but my OO in vb.net needs improving and i cant seem to get my head round interfaces in vb. I have played around with it for hours with no luck. I know this is quite a bit of code but if someone has any ideas i would be most grateful. Cheers Here is a module called interfaces Imports System.Drawing Public Interface IPrintableObject Sub Pront() Sub PrintPreview() Sub RenderPage(ByVal sender As Object, ByVal ev As System.Drawing.Printing.PrintPageEventArgs) End Interface Module Interfaces End Module Now here is the bit where i attempt to make the objects in a button. AxMSChart2.Edit() Dim printerName As Printing.PrinterSettings Dim data1 As IDataObject = Clipboard.GrtDataObject PictureBox1.Image = data1.GetData(DataFormats.Bitmap, True) Dim prints As New printImages prints.images = PictureBox1.Image CType(prints. IPrintableObject),Print() I realise that it is a bit of a mess, i have been trying to figure it out for ages and am just not having any luck. Thanks for any help!! Edited December 15, 2003 by wildfire1982 Quote Chris
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.