locked
How to add image through code to picturebox? RRS feed

  • Question

  • Hi

    How to add image through code to picture box .and how to navigate to other form to zoomin that image.

    how to applu audio in 6.5 apps .

    Friday, August 27, 2010 5:49 AM

Answers

All replies

  • Hi

    i want to apply audio for images when click on it.

    can u give me samples for that one .

    Friday, August 27, 2010 6:01 AM
  • could you please elaborate with your question. For more clarification.
    If you find my post is helpful for you then mark as a answer.
    Friday, August 27, 2010 6:19 AM
  • i want add images to picture box through code .and when click on that image it displays in next form page and coressponding sound and name also appear in the new form .could pls tell me how to do this.
    Friday, August 27, 2010 6:25 AM
  • To add picture using C#.Net Code see below code snippet:

    CODE
    _________________________________

    string path;
    path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
    pictureBox1.Image = new Bitmap(path + @"\Sunset.jpg");
    _________________________________

     
    And click on the picture box you can play your sound file and determine the next file name whatever you want.


    Hope this may be help.


    If you find my post is helpful for you then mark as a answer.
    Friday, August 27, 2010 7:06 AM
  • Please do not post same question you have already posted here. Don't do this.
    If you find my post is helpful for you then mark as a answer.
    Friday, August 27, 2010 7:14 AM
  • Hi,

    In addition to WmDev's reply, we can code in picturebox click event, like the code below:

    private void pictureBox1_Click(object sender, EventArgs e)
            {

            }

     

    For how to play sound:

    Play wav sound on Pocket PC

    QA: How can I change sound volume from my program?

    Playing audio on the Pocket PC

    Playing multiple wave files continuously and simultaneously

    Best regards,
    Guang-Ming Bian - MSFT


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, August 30, 2010 8:29 AM