title: VB6 converting to Jpeg with references from a paste
body: <p>I am trying to paste a picture into the app and convert right away from a bitmap to a jpeg. I had it working before but then the Microsoft Image Acquisition dll is not possible for some of the computers the app will be used on. I found code to modify it to do this:</p>
  
  <p>If Clipboard.GetFormat(vbCFMetafile) Or Clipboard.GetFormat(vbCFBitmap) Then
          strFileName = Format(Now, "ddhhmmss")</p>
  
  <pre><code>    If Clipboard.GetFormat(vbCFMetafile) Then
          SavePicture Clipboard.GetData(vbCFMetafile), strTemp &amp; "\" &amp; strFileName &amp; ".bmp"
      Else
          Dim bm As Bitmap
          bm = Clipboard.GetData(vbCFBitmap)
          bm.Save strTemp &amp; "\" &amp; strFileName &amp; ".jpg", System.Drawing.Imaging.ImageFormat.Jpg
  
      End If
      'UPLOAD to the DB
  
  End If
  </code></pre>
  
  <p>However when I run the app it says variable not defined on the "System.Drawing.Imaging.ImageFormat.Jpg, I have tried different combinations of Imaging.ImageFormat.Jpg and Drawing.Imaging.ImageFormat.Jpg to no avail. I have added under Project -> References "System.Drawing.dll" but I don't know if I have to in this case import it or define it somewhere else. </p>
  
  <p>Does anyone know how I could get this code to work, or a better way for me to make this conversion?</p>