On the frmMain form I have a richtextbox called rtbOutput. I am trying to access the richtextbox from FTPClient.
I wrote this to send text to the RichTextBox on frmMain:
C# |
I am getting an error on the second line where SelectionStart and Text.Length are being accessed. The error is that an object has not been set. I checked the value of rtbOutput and it is null.. I checked the value of frmMain.ActiveForm and it is null too..
So now there are two points to my question. Why is frmMain.ActiveForm null and is there another way to go about passing text from FTPClient to the RichTextBox belonging to the frmMain class?

Tanmay SarkarRank #1,407 · 1.2K reputationPosted Aug 6, 2010, 8:45 PM EDT
Thank you!
Sam HobbsRank #107 · 20.5K reputationPosted Aug 7, 2010, 12:45 PM EDT
In which class is the Output function in?