13-01-25, 02:29 AM
السلام عليكم ورحمة الله وبركاته
لقد قمت باستخدام هذا الكود لعمل رائي الجمهور ونجح ولكن لا ياتي بالاجابات صحيحة غير ذالك انا احتاج ان يقم الليبول باستخدام نسبة مئوية وتكون الالوان تصعد للاعلي وليس للاسفل مرفق الكود برجاء ان كان يوجد تعديل بشرح الاكواد اكون شاكر
لقد قمت باستخدام هذا الكود لعمل رائي الجمهور ونجح ولكن لا ياتي بالاجابات صحيحة غير ذالك انا احتاج ان يقم الليبول باستخدام نسبة مئوية وتكون الالوان تصعد للاعلي وليس للاسفل مرفق الكود برجاء ان كان يوجد تعديل بشرح الاكواد اكون شاكر
كود :
Imports System.Media
Public Class pupl
Dim Hg As Integer = 1
Dim Pic2Arry As PictureBox()
Dim PicLoc, LabLoc As New ArrayList
Dim Labpos As Label()
Dim rand As New Random
Private Sub TimProg_Tick(sender As Object, e As EventArgs) Handles TimProg.Tick
Hg += 10
PictureBox1.Size = New Size(30, Hg + 35)
PictureBox2.Size = New Size(30, Hg + 10)
PictureBox3.Size = New Size(30, Hg + 5)
PictureBox4.Size = New Size(30, Hg)
If Hg >= 100 Then
TimProg.Stop()
End If
End Sub
Private Sub pupl_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim sq As New SoundPlayer("gohor.wav")
sq.Play()
Label1.Text = fmlogin.Label2.Text
Label2.Text = fmlogin.Label3.Text
Label3.Text = fmlogin.Label4.Text
Label4.Text = fmlogin.Label5.Text
Pic2Arry = {PictureBox1, PictureBox2, PictureBox3, PictureBox4}
Labpos = {Label1, Label2, Label3, Label4}
PicLoc.Add(PictureBox1.Location)
PicLoc.Add(PictureBox2.Location)
PicLoc.Add(PictureBox3.Location)
PicLoc.Add(PictureBox4.Location)
LabLoc.Add(Label1.Location)
LabLoc.Add(Label2.Location)
LabLoc.Add(Label3.Location)
LabLoc.Add(Label4.Location)
For i = 0 To 3
Dim p = rand.Next(0, PicLoc.Count)
Pic2Arry(i).Location = PicLoc(p)
Labpos(i).Location = LabLoc(p)
PicLoc.RemoveAt(p)
LabLoc.RemoveAt(p)
Next
Me.TopMost = True
TimProg.Start()
If fmlogin.Label11.Text = 0 Then
fmlogin.Timer4.Stop()
End If
End Sub
End Class
