"save chart vb.net" Code Answer's

You're definitely familiar with the best coding language BASIC that developers use to develop their projects and they get all their queries like "save chart vb.net" answered properly. Developers are finding an appropriate answer about save chart vb.net related to the BASIC coding language. By visiting this online portal developers get answers concerning BASIC codes question like save chart vb.net. Enter your desired code related query in the search bar and get every piece of information about BASIC code related question on save chart vb.net. 

save chart vb.net

By Shy StoatShy Stoat on Dec 03, 2020
 ' Create a new save file dialog
   Dim saveFileDialog1 As New SaveFileDialog()
   
   ' Sets the current file name filter string, which determines 
   ' the choices that appear in the "Save as file type" or 
   ' "Files of type" box in the dialog box.
   saveFileDialog1.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png|SVG (*.svg)|*.svg|GIF (*.gif)|*.gif|TIFF (*.tif)|*.tif"
   saveFileDialog1.FilterIndex = 2
   saveFileDialog1.RestoreDirectory = True
   
   ' Set image file format
   If saveFileDialog1.ShowDialog() = DialogResult.OK Then
      Dim format As ChartImageFormat = ChartImageFormat.Bmp
      
      If saveFileDialog1.FileName.EndsWith("bmp") Then
         format = ChartImageFormat.Bmp
      Else
         If saveFileDialog1.FileName.EndsWith("jpg") Then
            format = ChartImageFormat.Jpeg
         Else
            If saveFileDialog1.FileName.EndsWith("emf") Then
               format = ChartImageFormat.Emf
            Else
               If saveFileDialog1.FileName.EndsWith("gif") Then
                  format = ChartImageFormat.Gif
               Else
                  If saveFileDialog1.FileName.EndsWith("png") Then
                     format = ChartImageFormat.Png
                  Else
                     If saveFileDialog1.FileName.EndsWith("tif") Then
                        format = ChartImageFormat.Tiff
                     Else
                        If saveFileDialog1.FileName.EndsWith("svg") Then
                           format = ChartImageFormat.Svg
                        End If
                     End If 
                  End If ' Save image
               End If
            End If
         End If
      End If
      Chart1.SaveImage(saveFileDialog1.FileName, format)
   End If

Source: social.msdn.microsoft.com

Add Comment

-1

All those coders who are working on the BASIC based application and are stuck on save chart vb.net can get a collection of related answers to their query. Programmers need to enter their query on save chart vb.net related to BASIC code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about save chart vb.net for the programmers working on BASIC code while coding their module. Coders are also allowed to rectify already present answers of save chart vb.net while working on the BASIC language code. Developers can add up suggestions if they deem fit any other answer relating to "save chart vb.net". Visit this developer's friendly online web community, CodeProZone, and get your queries like save chart vb.net resolved professionally and stay updated to the latest BASIC updates. 

BASIC answers related to "save chart vb.net"

View All BASIC queries

BASIC queries related to "save chart vb.net"

Browse Other Code Languages

CodeProZone