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. :) :)
thankyou, i was struggling on how to set the image as fixed when browsed, just by switching to zoom definitely helped thankyou
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
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(*.*)|*.*"
you did the code wrong
thanks! it works now :D
Thanks Dude💜
Thanks alot for this video. God Bless you richly
Good job buddy I appreciate that that is pretty much videos once again i appreciate u
Really I like your Channel
Wow!!! That's great! I love it!! Thank you
Good tutorial, thanks!
Thanks!
Superb❤️
thank you very much
i am facing this error on "Image1"
the name "Image1" does not exist in the current context
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... :) :)
Thank you 😍
THANKS
Thanks
Thank you
vraiment merci
Hello how can we save that image from that picturebox to the resources settings?
How to upload that pic on data grid view, can you give the peice of code for that toooo
Do you know how to record these upload photos in database?
how save photo after upload
can the image you uploud be put in a database?
Sorry @Drexel... It will just select the Image from your directory.... for Database You'll have to add some more code... :)
Maybe where instead of uploading the image on the PictureBox, perhaps you could upload one on the form Background?
Is there a way to keep the image there after you exit the program?
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... :)
Why is : try {
}
}
catch (Exception) {
}
wrong? or even the rest of it?
You can trust this video, congrats!
Can you make a video how can i save the picture?
ty
Thanks a lot! now i will try to save this on some arraylist, can you help me? :)
When i click on upload it is showing an error occurred
how to save it on database?
Many coding fonts are small and not visible
But what some tips are u gt for me?buddy I want to be like a professional GUI
i can't open png files
I can't upload image.
*i can't see it clearly*
after "dialog.Filter blalala*
please answer or notice me asap..
hehe :*
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);
}
}
How to get width and height of image into textbox?
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.
can u please share the code
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 :(
to a*
great tutorial, thank you, but music is sh#t
i am facing this error on "ImageLocation"
the name "ImageLocation" does not exist in the current context
did you found the error i tend to have the same mistake