Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

VBScript Basic

Make A Error Message.
Save As .vbs
x = msgbox("message Here" , 16, "title here")

Acceder a la fecha en la que una foto fue tomada en VB .NET

//Función a la que se le pasa el archivo jpg o jpge y devuelve la fecha en la que fue tomada

    Public Function ObtieneFecha(ByVal RutaArchivo As String) As Date

        Dim image As New Bitmap(RutaArchivo)
        Dim propItems As System.Drawing.Imaging.PropertyItem() = image.PropertyItems

        Dim encoding As New System.Text.ASCIIEncoding

        For i As Integer = propItems.GetLowerBound(0) To propItems.GetUpperBound(0)
            If propItems(i).Id.ToString = "36868" Then
                Dim strAux1() As String = Split(encoding.GetString(propItems(i).Value), " ")
                Dim strAux2() As String = Split(strAux1(0), ":")
                Dim strAux3() As String = Split(strAux1(1), ":")
                Return CDate(strAux2(0) & "/" & strAux2(1) & "/" & strAux2(2) & " " & strAux3(0) & ":" & strAux3(1) & ":" & strAux3(2))
            End If
        Next
        image.Dispose()
    End Function
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS