c# - Invalid access to memory location -
my code looks this:
webbrowser browser = new webbrowser(); browser.width = 700; browser.height = 200; **browser.url = new uri("about:blank");** browser.documenttext = mytext;
and error occurred in highlighted line ie:
badimageformatexception unhandled: invalid access memory location. (exception hresult: 0x800703e6).
i have search in many forums , change project property platform cpu. not works.
any appreciated.
thanks
you can try :
webbrowser webbrowser1 = new webbrowser(); webbrowser1.navigate("about:blank"); htmldocument objhtmldoc = webbrowser1.document; objhtmldoc.write("<span style=\"font-size:10px\">text </span>"); panel1.controls.add(webbrowser1);
this working fine me.
Comments
Post a Comment