منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : سبحان الله و الحمدلله ....
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .

PHP كود :
Public Class Form1
    Dim pics 
As New List(Of String)
 
   Dim apath As String IO.Path.GetDirectoryName(Application.ExecutablePath) & "\"
    Dim athkar As New List(Of String)
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        If IO.Directory.Exists(apath & "
makkah") Then
            pics.AddRange(IO.Directory.GetFiles(apath & "
makkah"))
            athkar.AddRange(New String() {"
سبحان الله", "الحمدلله", "لا اله الا الله", "الله اكبر"})
        End If
    End Sub
    Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
        Timer1.Enabled = sender.checked
    End Sub
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        Dim index As Integer = Int(Rnd() * pics.Count)
        If index >= pics.Count Then Exit Sub
        Dim pic As String = pics(index)
        If IO.File.Exists(pic) Then
            Me.PictureBox1.ImageLocation = pic
            picl.Text = pic
        End If
        Dim t As Integer = Int(Rnd() * athkar.Count)
        If t >= athkar.Count Then Exit Sub
        Dim s As String = athkar(t)
        lbl.Text = s
    End Sub
End Class 
لا جديد فقط حبيت اعمل الفكرة فيه مشروع به الصور وهو ذو الحجم الكبير بينما الاخر لا يحتوي اي صور