Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. how to display an image in run time?

how to display an image in run time?

Scheduled Pinned Locked Moved Mobile
csharpmobiletutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kmurthy
    wrote on last edited by
    #1

    i m using VC# using smartphone 2003.one image is dispalyed as a back ground image and another image(Stretchimage) is displayed as a superimposed on the background Image. the stretch image should be displayed in run time only. direct path of the image should not be given. we declare in one variable(in that variable we have to give the path) and we call that variable whereever we want.

    Y 1 Reply Last reply
    0
    • K Kmurthy

      i m using VC# using smartphone 2003.one image is dispalyed as a back ground image and another image(Stretchimage) is displayed as a superimposed on the background Image. the stretch image should be displayed in run time only. direct path of the image should not be given. we declare in one variable(in that variable we have to give the path) and we call that variable whereever we want.

      Y Offline
      Y Offline
      yasotrasagar
      wrote on last edited by
      #2

      Hi Kmurthy , M sending u a solution modify it according to ur requirement. (C# Code) public void SetImagePathInPictureBox( string sImagePath) { Stream stream = new FileStream(sImagePath,FileMode.Open); Bitmap img = new Bitmap(stream); stream.Close(); this.m_PictureBox.Image = img; } I think this will reslove ur problem. Reply me and kindly see my problem and give me the solution for it with some working code. Thanks and Regards Gurbhej Kumar S/W ENGG.

      K 1 Reply Last reply
      0
      • Y yasotrasagar

        Hi Kmurthy , M sending u a solution modify it according to ur requirement. (C# Code) public void SetImagePathInPictureBox( string sImagePath) { Stream stream = new FileStream(sImagePath,FileMode.Open); Bitmap img = new Bitmap(stream); stream.Close(); this.m_PictureBox.Image = img; } I think this will reslove ur problem. Reply me and kindly see my problem and give me the solution for it with some working code. Thanks and Regards Gurbhej Kumar S/W ENGG.

        K Offline
        K Offline
        Kmurthy
        wrote on last edited by
        #3

        can u tell me in the program where i can declare the image....... string sImagePath = @"sample.bmp" is it correct? where to store the images? it should be stored in resources or somewhere else?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups