html - Resize font in RichTextBox results in "Reference to a non-shared member requires an object reference" -


i trying re-size font in richtextbox activereports 7 report. code below selects text in richtextbox, when put breakpoint on line assigns new font selected text , hover mouse on selectionfont, says, "{name= reference non-shared member requires object reference. size= 10.0}." if step past breakpoint, next line of code (no matter is) give null reference exception. if comment out these re-sizing lines, report runs fine. doing wrong here, , how can fix problem font can re-sized?

code:

dim out string = rdr.item("directions").tostring().replace("<br />", "").replace("    <br>", "").replace(environment.newline, "<br />").replace("text-indent: 0px;", "").replace("  <p>", "<br />").replace("</p>", "") richtextbox1.html = out  richtextbox1.selectionstart = 0   richtextbox1.selectionlength = richtextbox1.text.length   richtextbox1.selectionfont = new system.drawing.font("arial", 9) 


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -