Hi Friends..
i am planning to write something on a picture box.in the page load event i am able to do that.
Graphics g = Graphics.FromImage(pictureBox1.Image);
Font font = new Font("Courier New", 6);
payagainst = "PARADISE TRADING, CONT & REAL ESTATE";
amount = 3300;
g.DrawString(payagainst, font, new SolidBrush(Color.Black), pagainstX, pagainstY);
My requirement is there is two textbox in the form ie to mention the the X and Y coordinates of the newly drawn label. If the user changes the values in the textbox position of the label has to be changed according to the values given in the text box. in the text box leave event i have written the code as follows. but its not working. whats the correct method to achieve this.
private void txtpaX_Leave(object sender, EventArgs e)
{
if (flag != 0)
{
Graphics gs = Graphics.FromImage(pictureBox1.Image);
Font font = new Font("Courier New", 6);
payagainst = "PARADISE TRADING, CONT & REAL ESTATE";
amount = 3300;
gs.DrawString(payagainst, font, new SolidBrush(Color.Black), float.Parse(txtpaX.Text), float.Parse(txtpaY.Text));
flag = 1;
}
}