how can i change the location of a textbox ?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
hello
im doing a paint program and in it i want to whrite a text , im using a textBox and a richtextbox (where im doing my paints ) and a button
here a sample of my prog :
bool showtextb=false;
//when i click a button(text)
private void text_Click(object sender, EventArgs e)<br/>
{<br/>
showtextb = true;
}
private void textBox1_TextChanged(object sender, EventArgs e)<br/>
{<br/>
if (showtextb == false)<br/>
textBox1.Hide();
// i want to modify the position of the textbox i wanted to show in the position where i cliqued the mouse in the richtext box;
private void richTextBox1_MouseDown(object sender, MouseEventArgs e)<br/>
{<br/>
preX = e.X; <br/>
preY = e.Y;<br/>
}

please how can i make my textbox appears in the location of the point (prex,prey) and not the default position before debug
also i have a problem when i resize the size of the forum in the debug time all my draws are erased how can i keep them ?

and thank you;


View the full article
 
Back
Top