Printing and OO

wildfire1982

Well-known member
Joined
Oct 23, 2003
Messages
50
Location
Southampton
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

Code:
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.
Code:
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!!
 
Last edited by a moderator:
Back
Top