Capture WebBrowser

oli91191 Messages postés 12 Date d'inscription mardi 15 novembre 2005 Statut Membre Dernière intervention 29 février 2008 - 29 févr. 2008 à 02:44
PCPT Messages postés 13272 Date d'inscription lundi 13 décembre 2004 Statut Membre Dernière intervention 3 février 2018 - 29 févr. 2008 à 17:21
Bonjour à tous,
J'aimerais savoir comment qu'on fait pour capture la page web complète dans le .Net WebBrowser (pas le ShDocVw) et la transformer en un bitmap.Je veux que la page soit capturée au-delà des "scroll bars". Je sais que c'est possible avec des API Windows (comme GetDC ou WM_PRINT), mais je sais pas quoi faire avec ça.

J'utilise le Visual Basic mais je comprend très bien le C# aussi..
Thanks

[English]

Hi All,
I would like to know how can I capture an ENTIRE webbpage in the .Net 2 WebBrowser control (not the ShDocVw Com Component) and turn it into a bitmap. I want the page to be captured beyond the scroll bars of the WebBrowser. I know that this is possible with some API calls (like GetDC or WM_PRINT), but I don't know how to use that.

I am using VB but I understand C# as well.
Thanks

1 réponse

PCPT Messages postés 13272 Date d'inscription lundi 13 décembre 2004 Statut Membre Dernière intervention 3 février 2018 47
29 févr. 2008 à 17:21
salut,
si le browser à un handle, tu peux utiliser l'API PrintWindow
vers un hDC puis le travailler ensuite..

++
<hr size="2" width="100%" />Prenez un instant pour répondre à [infomsg_SONDAGE-POP3-POUR-CS_769706.aspx ce sondage] svp
0
Rejoignez-nous