I need to to send variables between two forms in the same project is that possible ??
also can I change the color of some text in text box but not the whole the text ??
Thanks in advance

1-To send variable from one form to another just declare public variable in the target form and set it in the instance
2-no you cannot you will need to use richtextbox

how to do the first one ? can you give me an example?
I'm using richtextbox , so can I change the color of only one word for example??

issue1

Form1:Form
{
public int dataToHere;
}
Form2:Form
{
void test()
{
Form1 obj=new Form1();
obj.dataToHere=10;
}
}

issue2

richTextBox1.SelectionStart = 0;
richTextBox1.SelectionLength= 3;
richTextBox1.SelectionColor = Color.Red;

thanks a lot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.