is theres any way to add time and date on picture itself when save

Viewed 43

is theres any way to add time and date on picture itself when save

Dim data As IDataObject
    Dim bmap As Image
    '  Dim g As Graphics = picCapture.CreateGraphics()
    ' g.DrawString("SAVED ON - " & Now, New Font("Arial", 18), Brushes.Yellow, 10, 10)

    ' Copy image to clipboard
    SendMessage(hHwnd, WM_CAP_EDIT_COPY, 0, 0)

    ' Get image from clipboard and convert it to a bitmap

    data = Clipboard.GetDataObject()

    If data.GetDataPresent(GetType(System.Drawing.Bitmap)) Then

        bmap = CType(data.GetData(GetType(System.Drawing.Bitmap)), Image)

        picCapture.Image = bmap

        PictureBox1.Image = picCapture.Image


        sfdImage.FileName = TextBox1.Text

        SendKeys.Send("{Enter}")

        If sfdImage.ShowDialog = DialogResult.OK Then

            If InStr(sfdImage.FileName, ".bmp") Then

                bmap.Save(sfdImage.FileName, Imaging.ImageFormat.Bmp)

            Else
                bmap.Save(sfdImage.FileName, Imaging.ImageFormat.Jpeg)

                'SendKeys.Send("{Enter}")
                TextBox1.Clear()
                TextBox1.Focus()
            End If
        End If
    End If
End Sub
0 Answers
Related