Hi All, I draw a user defined message on a MDI Form using DrawString() in the Paint event, what I would like to do, is , if the user clicks or double clicks on the text , popup some method which enables them to specify the text, I suppose what I'm asking is, how do I know if the mouse is over my *drawn text* ? This is the code I use called from Paint() .
void DrawMyText(Graphics g, string MyText)
{
SizeF s = g.MeasureString(MyText, MyFont);
float x = this.Width / 2 - s.Width / 2;
float y = this.Height / 2 - s.Height / 2;
g.DrawString(MyText,MyFont,Brushes.Gold,x,y,StringFormat.GenericTypoGraphic);
}
This just centres the text on the form.
Regards,
Peter J. Kane
Pete