c# - Adding a image element to a webbrowser control page (existing site) -


i'm trying create element image windows forms webbrowser control existing site. want move created element position. have code, doesn't work.

 private void webbrowser1_documentcompleted(object sender, webbrowserdocumentcompletedeventargs e)     {         webbrowser1.document.getelementbyid("gpu_notice").style = "display:none";          webbrowser1.document.getelementbyid("header").outerhtml = "";         webbrowser1.document.getelementbyid("ads").outerhtml = "";         webbrowser1.document.getelementbyid("the_game").style += "position: absolute; top: 0px; right: 0px;";         htmlelement logo = webbrowser1.document.createelement("logo");         logo.setattribute("src", @"c:\users\susana\documents\projeto haxballk\design\logo hk.png");         webbrowser1.document.body.appendchild(logo);         logo.setattribute("float", "right");     } 

is task inserting element existing html document displayed webbrowser class? if yes, steps (not tested, sorry)

  1. download document using webclient html string
  2. make <body> relative in html string (insert style='position: relative' <body> element)
  3. insert element html string, after <body>, make element absolute (setting style='position: absolute; left=...; right=...'
  4. set modified html string documenttext property of webbrowser class

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -