Groups | Blog | Home
all groups > dotnet compact framework > november 2006 >

dotnet compact framework : Drawing in Pocket PC picture Box


Peter
11/20/2006 11:52:50 AM
Fabien
11/20/2006 12:30:24 PM
Hi,

You have the Paint event :
private void pictureBox1_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
// Create a local version of the graphics object for the
PictureBox.
Graphics g =3D e.Graphics;

..=2E.Drav what you want wit the Graphics object

}

If you just want to set an image :

pictureBox1.SizeMode =3D PictureBoxSizeMode.StretchImage ;
MyImage =3D new Bitmap("yourFilePath");

pictureBox1.Image =3D (Image) MyImage ;

BR


Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/


Peter a =E9crit :

[quoted text, click to view]
to draw images in it since there isn't any Picture Box Paint event. How sho=
uld I do it? Thanks!
vikash
11/21/2006 1:07:06 AM
Hello
Try looking for Signature Control on Pocket PC. It will help u in
making a class for drawing images and all.

Thanks n Regards
Vikash

[quoted text, click to view]
Peter
11/22/2006 3:15:59 PM
Fabien
11/22/2006 11:43:14 PM
Hi Peter,

You must override the OnPaint method :
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
// Add your code here
}

BR


Fabien Decret
Windows Embedded Consultant


ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/



Peter a =E9crit :

[quoted text, click to view]
n had a Paint event and it doesn't...
AddThis Social Bookmark Button