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??


public int dataToHere;
void test()
Form1 obj=new Form1();


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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.