Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (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 by wildfire1982
Chris

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...