2
Answers

Alternative ways to load images with WebBrowser control

Ask a question
Bobby

Bobby

14y
5k
1
Hello,

I have an application in C# with VS 2008 in which I generate images based off of data supplied by the user, and then I use those images and and generate a html based report, loading it to a webbrowser, and letting the user print it.

My only problem is right now, the only way I can get it to work with the WebBrowser is saving the image on the hard drive, adding the <img ....> tags and then printing the report.

Previously in C++ I used a HTML Viewer that allowed to load images from a memory stream, but I have yet to see any proof that this is possible with the .NET WebBrowser.  Another idea I had was to try and save the image to a resource, but I don't know if that will work either.

So, does anyone here know of a method to load these images without saving them to the drive?

Answers (2)