How to upload an image on windows form Application C#

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2024

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

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

    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

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

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

  • @yagnesh.khamar
    @yagnesh.khamar 7 ปีที่แล้ว +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 7 ปีที่แล้ว +1

    Really I like your Channel

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

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

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

    Superb❤️

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

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

  • @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... :) :)

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

    Good tutorial, thanks!

  • @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... :)

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

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

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

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

  • @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... :)

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

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

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

    thank you very much

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

    Thank you 😍

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

    Thanks!

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

    You can trust this video, congrats!

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

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

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

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

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

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

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

    how save photo after upload

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

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

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

    Thank you

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

    Thanks

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

    THANKS

  • @MusaNajafov
    @MusaNajafov 13 วันที่ผ่านมา

    When I write image1 visual studio give me error

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

    vraiment merci

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

    How to get width and height of image into textbox?

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

      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.

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

    Why is : try {
    }

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

  • @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 :(

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

    how to save it on database?

  • @katedianebaquero6567
    @katedianebaquero6567 7 ปีที่แล้ว +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);
      }
      }

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

    ty

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

    When i click on upload it is showing an error occurred

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

    Many coding fonts are small and not visible

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

    can u please share the code

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

    i can't open png files

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

    I can't upload image.

  • @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

    • @njmusama
      @njmusama 2 วันที่ผ่านมา

      you need to create a variable like this before try statement string imageLocation = "";