Sunday 17 February 2019

Liked on YouTube: Vb.net savefiledialog example

Vb.net savefiledialog example

save dialog box in vb.net. we are using the save file dialog box in vb.net The SaveFileDialog component allows users to browse the file system and select files to be saved. The dialog box returns the path and name of the file the user has selected in the dialog box. However, you must write the code to actually write the files to disk. To save a file using the SaveFileDialog component Display the Save File dialog box and call a method to save the file selected by the user. Use the SaveFileDialog component's OpenFile method to save the file. This method gives you a Stream object you can write to. The example below uses the DialogResult property to get the name of the file, and the OpenFile method to save the file. The OpenFile method gives you a stream to write the file to. In the example below, there is a Button control with an image assigned to it. When you click the button, a SaveFileDialog component is instantiated with a filter that allows files of type .gif, .jpeg, and .bmp. If a file of this type is selected in the Save File dialog box, the button's image is saved. private void button2_Click(object sender, System.EventArgs e) { // Displays a SaveFileDialog so the user can save the Image // assigned to Button2. SaveFileDialog saveFileDialog1 = new SaveFileDialog(); saveFileDialog1.Filter = "JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif"; saveFileDialog1.Title = "Save an Image File"; saveFileDialog1.ShowDialog(); // If the file name is not an empty string open it for saving. if(saveFileDialog1.FileName != "") { // Saves the Image via a FileStream created by the OpenFile method. System.IO.FileStream fs = (System.IO.FileStream)saveFileDialog1.OpenFile(); // Saves the Image in the appropriate ImageFormat based upon the // File type selected in the dialog box. // NOTE that the FilterIndex property is one-based. switch(saveFileDialog1.FilterIndex) { case 1 : this.button2.Image.Save(fs, System.Drawing.Imaging.ImageFormat.Jpeg); break; case 2 : this.button2.Image.Save(fs, System.Drawing.Imaging.ImageFormat.Bmp); break; case 3 : this.button2.Image.Save(fs, System.Drawing.Imaging.ImageFormat.Gif); break; } fs.Close(); } } how to create dave file dialog box in vb.net,how to use save dialog box in vb.net,how to write a code in save file dialogbox to save a file,how to use save file dialogbox in vb,how to open savefile dialogbox,save file dialog vb.net,how to show savefile dialogbox,Vb.net SaveFileDialog,save file dialog visual studio,save file dialog c#,code for save button in visual studio 2010,code for save button in vb 2010,save dialog box in vb.net,savefile dialog box in vb.net,savefiledialog -~-~~-~~~-~~-~- How to install wordpress in xampp step by step https://www.youtube.com/watch?v=YdwMhXX-FLE How to create menu and submenu in wordpress https://www.youtube.com/watch?v=PACC3farNPY https://www.youtube.com/watch?v=8kG3JTbGAbw How to install wordpress theme with demo data free How to change footer copyright in wordpress https://www.youtube.com/watch?v=3oIkPWYXyyQ How to change footer widget in wordpress https://www.youtube.com/watch?v=1HbnBbZX9tA How to backup & restore your wordpress website in 3 minutes free 2018 https://www.youtube.com/watch?v=pSr5w4U36c8 How to use the revolution slider plugin with Button Link - full tutorial 2018 https://www.youtube.com/watch?v=KMBFxOlObx4 https://www.youtube.com/watch?v=z5jbofGMOHM How to add new user role in wordpress How To Add YouTube Video To Your WordPress Website 2018 https://www.youtube.com/watch?v=jCWQ7oA2bBA How to add contact form 7 in wordpress page https://www.youtube.com/watch?v=E9U27FOPNyo How to change favicon in wordpress theme https://www.youtube.com/watch?v=uvczOIqdVYk How to use tubebuddy on youtube - 2018 full tutorial https://www.youtube.com/watch?v=N1zpn3sT-2o How to add additional css in wordpress 2018 https://www.youtube.com/watch?v=2L7lHf_0C-E -~-~~-~~~-~~-~-
via YouTube https://youtu.be/Ju3SLFgGtb0

No comments:

Post a Comment

😍Developer on Weekends #shorts #officememes #developermemes

😍Developer on Weekends #shorts #officememes #developermemes Welcome to the latest viral YouTube shorts meme for developers! 😍Developer on...