Windows Develop Bookmark and Share   
 index > Windows Forms General > Printing image from desktop application (VB)
 

Printing image from desktop application (VB)

Hi, I´ve got this ASP.NET desktop application, which has a form containing a mapcontrol. The form also contain a button, which I use to produce a imagefile from the current image of this mapcontrol.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ExportObject As MapInfo.Mapping.MapExport = New MapInfo.Mapping.MapExport(Me.MapControl1.Map)

        ExportObject.ExportSize = New MapInfo.Mapping.ExportSize(Me.MapControl1.Map.Size.Width, Me.MapControl1.Map.Size.Height)
        ExportObject.Format = MapInfo.Mapping.ExportFormat.Bmp
        ExportObject.Export("C:\Temp\ExportImage.bmp")
        Printing()
    End Sub

Now I would like to be able to fetch this image and print it with my default printer. Sounds simple, but since I am a novice, I don´t know how to.
I tried to read about the PrintDocument.PrintPage Event in the .NET Framework Class Library, but I need to fetch the image and not a text via a stream.
All suggestions are greatly appreciated.
newdot  Thursday, September 08, 2005 6:55 AM
Really no-one with any experience in printing images from desktop application? Surprising :-)
newdot  Tuesday, September 13, 2005 11:07 AM

You can use google to search for other answers

Custom Search

More Threads

• C# Handles
• Setting PowerPoint slideshow as active window over a form
• Dragging a form around the screen
• Use of Localization for multiple language
• {SOLVED} how to know if item is selected in ListView
• A generic error occurred in GDI+. while saving
• Status Bar - why do i have to scroll to see it?
• Visual C# forms - Table with check boxes
• TreeNode ScrollBar
• convert IntPrt back to its original Object in VB.NET.