How to upload an image on windows form Application C#

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024
  • In this tutorial we'll learn about how we can insert/upload an image on Windows Form Application C#.
    ++++++++++++++++++++++++++++++++++++++++++++
    Follow Me on Linkedin:
    / salaar-husceyn
    Follow us on Google Plus:
    plus.google.co...
    ++++++++++++++++++++++++++++++++++++++++++++
    if You Have any Query, feel free to contact Us on Facebook:
    / csharpuiacademy
    ++++++++++++++++++++++++++++++++++++++++++++
    Please Don't forget to Subscribe for More Videos. :) :)

ความคิดเห็น • 53

  • @ruelleramento9966
    @ruelleramento9966 4 หลายเดือนก่อน +1

    thankyou, i was struggling on how to set the image as fixed when browsed, just by switching to zoom definitely helped thankyou

  • @Dazhdaha
    @Dazhdaha 4 ปีที่แล้ว +3

    Thank you so much I was searching on google and watching videos for 5 hours and this video was only 4 minutes long and the others took like 30 minutes and didn't even do show how to do this so thank you so very much

  • @yagnesh.khamar
    @yagnesh.khamar 6 ปีที่แล้ว +17

    The code is great, the one mistake here is that the filter string have a validation error. You can try this to sort this out...
    "jpg files(.*jpg)|*.jpg| PNG files(.*png)|*.png| All Files(*.*)|*.*"

  • @vinujanvinu8362
    @vinujanvinu8362 ปีที่แล้ว +2

    Thanks Dude💜

  • @israelojo787
    @israelojo787 6 ปีที่แล้ว +1

    Thanks alot for this video. God Bless you richly

  • @hamzahashi3434
    @hamzahashi3434 6 ปีที่แล้ว +1

    Good job buddy I appreciate that that is pretty much videos once again i appreciate u

  • @hamzahashi3434
    @hamzahashi3434 6 ปีที่แล้ว +1

    Really I like your Channel

  • @brenlify-watch7822
    @brenlify-watch7822 3 ปีที่แล้ว

    Wow!!! That's great! I love it!! Thank you

  • @ruiassis7109
    @ruiassis7109 5 ปีที่แล้ว +2

    Good tutorial, thanks!

  • @stef9019
    @stef9019 4 ปีที่แล้ว +1

    Thanks!

  • @gavindupriyadarshitha5179
    @gavindupriyadarshitha5179 4 ปีที่แล้ว

    Superb❤️

  • @loicnguekeng4692
    @loicnguekeng4692 5 ปีที่แล้ว +1

    thank you very much

  • @mohammadadeel9159
    @mohammadadeel9159 6 ปีที่แล้ว +5

    i am facing this error on "Image1"
    the name "Image1" does not exist in the current context

    • @CUiAcademy
      @CUiAcademy  6 ปีที่แล้ว +13

      Hi @Muhammad_Adeel.... "Image1" is Name of my PictureBox... if you did't rename your picturebox, please use PictureBox1 instead of Image1..... thanks for watching my Video... :) :)

  • @ranbijayashah
    @ranbijayashah 5 ปีที่แล้ว +1

    Thank you 😍

  • @misterlode0
    @misterlode0 5 ปีที่แล้ว +1

    THANKS

  • @codingislife6387
    @codingislife6387 5 ปีที่แล้ว +1

    Thanks

  • @Technew.
    @Technew. 6 ปีที่แล้ว +1

    Thank you

  • @loicnguekeng4692
    @loicnguekeng4692 5 ปีที่แล้ว +1

    vraiment merci

  • @DiyintheGhetto
    @DiyintheGhetto ปีที่แล้ว

    Hello how can we save that image from that picturebox to the resources settings?

  • @madhumitamanivannane4418
    @madhumitamanivannane4418 3 ปีที่แล้ว +1

    How to upload that pic on data grid view, can you give the peice of code for that toooo

  • @4yawK0L
    @4yawK0L 5 หลายเดือนก่อน

    Do you know how to record these upload photos in database?

  • @akramhussein2939
    @akramhussein2939 5 ปีที่แล้ว +1

    how save photo after upload

  • @drexeltimogtimog5700
    @drexeltimogtimog5700 6 ปีที่แล้ว +2

    can the image you uploud be put in a database?

    • @CUiAcademy
      @CUiAcademy  6 ปีที่แล้ว +1

      Sorry @Drexel... It will just select the Image from your directory.... for Database You'll have to add some more code... :)

  • @Exodots
    @Exodots 5 ปีที่แล้ว

    Maybe where instead of uploading the image on the PictureBox, perhaps you could upload one on the form Background?

  • @jtg4416
    @jtg4416 4 ปีที่แล้ว +1

    Is there a way to keep the image there after you exit the program?

    • @CUiAcademy
      @CUiAcademy  4 ปีที่แล้ว +1

      Hello JTG... You can use file handling to do that... Just store the image location in a text file and read that location on form load.... You can also use a database to achieve this task.... Thank you so much for watching our videos... :)

  • @anadibrothers-yourwaytorel5259
    @anadibrothers-yourwaytorel5259 4 ปีที่แล้ว

    Why is : try {
    }

    }
    catch (Exception) {
    }
    wrong? or even the rest of it?

  • @claudiosilva5346
    @claudiosilva5346 5 ปีที่แล้ว

    You can trust this video, congrats!

  • @keralazap
    @keralazap 3 ปีที่แล้ว

    Can you make a video how can i save the picture?

  • @Pages_Perfected
    @Pages_Perfected 3 ปีที่แล้ว

    ty

  • @eguoc
    @eguoc 5 ปีที่แล้ว

    Thanks a lot! now i will try to save this on some arraylist, can you help me? :)

  • @saicharan2351
    @saicharan2351 2 ปีที่แล้ว

    When i click on upload it is showing an error occurred

  • @emperor7369
    @emperor7369 2 ปีที่แล้ว

    how to save it on database?

  • @raminazdi3416
    @raminazdi3416 3 ปีที่แล้ว

    Many coding fonts are small and not visible

  • @hamzahashi3434
    @hamzahashi3434 6 ปีที่แล้ว +1

    But what some tips are u gt for me?buddy I want to be like a professional GUI

  • @RafaelRodrigues-if6wr
    @RafaelRodrigues-if6wr 4 ปีที่แล้ว

    i can't open png files

  • @hanlinoo9256
    @hanlinoo9256 ปีที่แล้ว

    I can't upload image.

  • @katedianebaquero6567
    @katedianebaquero6567 6 ปีที่แล้ว +1

    *i can't see it clearly*
    after "dialog.Filter blalala*
    please answer or notice me asap..
    hehe :*

    • @moazayman388
      @moazayman388 5 ปีที่แล้ว +1

      private void bt_upload_Click(object sender, EventArgs e)
      {
      try
      {
      // code
      OpenFileDialog dialog = new OpenFileDialog();
      dialog.Filter = "jpg files(.*jpg)|*.jpg| PNG files(.*png)|*.png| All Files(*.*)|*.*";
      if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
      {
      imagelocation = dialog.FileName;
      img_ex.ImageLocation = imagelocation;
      }
      }
      catch (Exception )
      {
      MessageBox.Show("An error occured", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
      }
      }

  • @Tiff_Dragoon
    @Tiff_Dragoon 3 ปีที่แล้ว

    How to get width and height of image into textbox?

    • @johnali4117
      @johnali4117 2 ปีที่แล้ว

      You don't. You just select the property to Stretch the image and fit into the picture box. that's what I do although this might distort some images but I have kept the size of the box standard for passport size photos. I have only created a phonebook/ContactBook that requires a photo of the contact.

  • @ibrahimali1926
    @ibrahimali1926 2 ปีที่แล้ว

    can u please share the code

  • @joaoassembleia8575
    @joaoassembleia8575 4 ปีที่แล้ว

    hey how do i upload a image do a picturebox and change de image of the picturebox ? i need to do that on a project, i dont know how to do guys :(

  • @m3xpl4y
    @m3xpl4y 4 ปีที่แล้ว

    great tutorial, thank you, but music is sh#t

  • @judegang1513
    @judegang1513 3 ปีที่แล้ว

    i am facing this error on "ImageLocation"
    the name "ImageLocation" does not exist in the current context

    • @rudysantos1712
      @rudysantos1712 3 ปีที่แล้ว

      did you found the error i tend to have the same mistake