⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slideshow.txt

📁 I was trying to develope a programme to make a slide show of all the pictures of a folder using vb.n
💻 TXT
字号:
 Dim str As String
    Dim files(50) As String
    Dim i As Integer = 0
    Dim j As Integer = 0
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Me.FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
            Dim DI As New IO.DirectoryInfo(Me.FolderBrowserDialog1.SelectedPath)
            Dim AF As IO.FileInfo() = DI.GetFiles("*.jpg")
            Dim FI As IO.FileInfo
            Dim t As Integer = 0
            For Each FI In AF
                files(t) = FI.Name.ToString
                t += 1
            Next

        End If
        Me.Timer1.Enabled = True
        'Me.Label1.Text = Me.FolderBrowserDialog1.SelectedPath
    End Sub

    Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.Event) Handles Timer1.Tick
        Me.PictureBox1.Image = Image.FromFile(Me.FolderBrowserDialog1.SelectedPath & "\" & files(i))
        Me.Label1.Text = files(i)
        i += 1
    End Sub

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -