views:

31

answers:

2
private void pictBoxUp_Click(object sender, EventArgs e)
{
    label1.Text = "Up";
    pictBoxUp.Image=System.Drawing.Bitmap(
        "how do i select path for another image in my desktop");
}

these are the codes i'm testing around

A: 

Your question is unclear. Changing the image in the PictureBox is simple:

var pathToMyFile = "\\My Program\\myimage.png";

if(pictureBox.Image != null)
  pictureBox.Image.Dispose();

pictureBox.Image = new Bitmap(pathToMyFile);

Your note does, however, say something about a "desktop". If you're wondering how to load the image on the device when the image resides on a PC, well that's not so simple. You need to find a mechanism (WCF service is probably the easiest) for the device to ask the PC for the picture. The code for that is more complex than a simple SO answer.

ctacke
thanks alot!!! :)
cheesebunz
guys i solved it . When you connect to device, the path will be diff already. Answer :picturebox.Image = new BitMap(@"example.jpg");
cheesebunz
A: 

guys i solved it . When you connect to device, the path will be diff already. Answer : picturebox.Image = new BitMap(@"example.jpg");

cheesebunz
the example.jpg must be in ur device storage.
cheesebunz