Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS 2010 Load background image from folder

$
0
0
hi everyone i have a problem with my code i
made the code so after the on program load
its will load the background image from folder that i made
but its not working
i dont have error or warning its just that its dont read that
code like there is no code in the first place...
so please help...

Code:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim PicFolderName As String = GetSetting("mayappname", "settings", "picturefolder", My.Computer.FileSystem.SpecialDirectories.MyDocuments)
        PicFolderName = "c:\DownloaderGames"
        LoadImageNames(PicFolderName)
    End Sub

    Private ImageNames As New List(Of String)
    Private Sub LoadImageNames(ByVal ImagePath As String)
        For Each file As String In IO.Directory.GetFiles(ImagePath, "*.jpg")
            ImageNames.Add(file)
        Next
    End Sub


Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>