Click to See Complete Forum and Search --> : image resizing


NPG101984
December 17th, 2006, 08:34 AM
hi,
I want to prevent the image resizing by user.
I am converting a given text into bitmap image an then rendring it inside richtextbox.
Presently the user can click the image and do resize of the image.This should not be allowed.

this is the code:

string str = arraychar[i].ToString().Trim();
graphic.DrawString(str, textPresentFont, brush, new Rectangle(0, 0, width, height));

Bitmap bm = (Bitmap)bmp.GetThumbnailImage(bmp.Width*2 ,bmp.Height, null, IntPtr.Zero);

Clipboard.SetDataObject(bm);

DataFormats.Format myFormat = DataFormats.GetFormat (DataFormats.Bitmap);
richTextBox1.ReadOnly = false;
richTextBox1.Paste(myFormat);
richTextBox1.ReadOnly = true;


someone please reply ASAP.

thanks in advance.