image from a web control

W

WebBuilder451

is it possible to create an image from a web control. Given something simple
like a label control with text that may include html mark up language. Can a
bitmap object then be created to accept the control and then save it out as a
gif or a jpg?
 
G

George

Nope.
Webcontrol are not object that have a visible representation.
All they do is generate HTML.
Browser is responsible for rendering an HTML and has no idea how this HTML
was generated using ASP or PERL or WebControls...

Usually the way screenshots are captured is using 'print' capabilities of
the browser and special print driver that "prints" into image.
for example IE will print HTML page using command line

rundll32.exe %windir%\system32\mshtml.dll,PrintHTML "myfile.htm"

George.
 
T

Tim Payne

You can create an image quite happily using the system.drawing namespace,
its fairly easy to have a base image and then add text to that image. You
could generate the image on the postback and stream it to the browser.

Creating an image from html would be harder. You'd have to take a screen
grab and then cut out the bit of the image you want I guess. It'd also have
to be done client side, which means getting into the realms of active x
controls and the like.

Can you give a more specific example of whatit is you're trying to do?

Cheers,

Tim.
 
Y

YankeeImperialistDog

this could work using rundll32.exe %windir%\system32\mshtml.dll,PrintHTML
"myfile.htm"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top