visualize videos and photos in the same visual studio picturebox that are in a folder

1

Is it possible to visualize in visual basic, in a picturebox control images and videos at the same time transiently? I have the knowledge of how to do it but separately, I do not know how to make both photos and videos pass automatically between each other, contained in the same folder ..

So I do it with images:

    Dim con As New SqlConnection
    Dim cmd As New SqlCommand
    con.ConnectionString = "Data Source=192.168.1.251;Initial Catalog=infomuni;User ID=sa; Password=2005;"
    con.Open()
    cmd.Connection = con
    cmd.CommandText = "SELECT ubicacion FROM fotos"
    Dim lrd As SqlDataReader = cmd.ExecuteReader()
    If lrd.Read() Then
        lblSlideRuta.Text = lrd("ubicacion")
    End If
    con.Close()

    If lblSlideRuta.Text <> "" Then

        Dim di As New IO.DirectoryInfo(lblSlideRuta.Text)
        ImageDir = di.GetFiles("*.jpg").Concat(di.GetFiles("*.bmp")).Concat(di.GetFiles("*.png")).Concat(di.GetFiles("*.gif")).ToArray
        Dim dra As IO.FileInfo
        frm = New Form
        frm.Name = "frm"
        FullSizePic = New PictureBox
        FullSizePic.Dock = DockStyle.Fill
        FullSizePic.BackColor = Color.Black
        FullSizePic.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom

        PicBoxImagenes.Controls.Add(FullSizePic)
        AddHandler frm.KeyDown, AddressOf frm_keydown

        TimerSlide.Enabled = True

        GetnextImage()
    End If
    
asked by Pedro 28.06.2018 в 17:58
source

0 answers