Latheesan

I'm create an instance called shtb like this:

Code Snippet
public form1()
{
InitializeComponent();

SyntaxHighlightingTextBox shtb = new SyntaxHighlightingTextBox();
...
}

Later in the script, i tried to use the instance shtb like this:

Code Snippet
static string strMyOriginalScript = "";
private void form1_Load(object sender, System.EventArgs e)
{
strMyOriginalScript = shtb.Text;
}

When ever i try to build the solution, i keep getting the error:

'Editing Area' does not exist in the current context

Where im i going wrong Can anyone help me with atleast this


Re: Visual C# General instance does not exist in the current context

Mark Dawson

Hi,

do you have the exact error that is shown

Mark.






Re: Visual C# General instance does not exist in the current context

Latheesan

That is the exact error shown.



Re: Visual C# General instance does not exist in the current context

Latheesan

Code Snippet
SyntaxHighlightingTextBox shtb = new SyntaxHighlightingTextBox();

this is a control that was provided from an external .dll

so, i added the dll into my project reference first and then, in the top of the form1.cs, i have this code:

Code Snippet
using SyntaxHighlighting;

and iniside the form1_Load(); i have this code now:

Code Snippet
Controls.Add(shtb);

Yet, i still get that error "The name 'shtb' does not exist in the current context"





Re: Visual C# General instance does not exist in the current context

Latheesan

Never mind, i have figured out the answer:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=523645&SiteID=1