السلام عليكم
انا طالبة جامعة ام القرى عندي تسليم مشروع يوم السبت في برنامج فيجوال بيسك 2005
ممكن مساعدتكم لا هنتوا
هذي هياالوجهة
المطلوب انو المستخدم يختار العملية اللي يبي يختبر فيها
و تطلع له رقمين عشوائيين اللي علية انو يكتب الاجابة الصحيحة
في التيكست بوكس اذا كانت اجابته صح تطلع له صورة توضع له انه اجابته صحيحه
اما اذا كانت اجابته خطا تطلع له صورة توضح لو انو اجابته خطا
انا استخدمت ه الكود مدري صح ولا توني مبتدئة في هالبرنامج
كود:
Public Class Form6
Dim i As Integer
Dim w As Integer
Dim m As Integer
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim form6 As New Form6
Dim form2 As New Form2
form6.Hide()
form2.Show()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Label3. = CStr(Int(Rnd() * 10))
Label2. = CStr(Int(Rnd() * 10))
m = Label3. = CStr(Int(Rnd() * 10))
w = Label2. = CStr(Int(Rnd() * 10))
End Sub
Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Randomize()
PictureBox1.Image = System.Drawing.Image.FromFile("C:\صح.png")
PictureBox2.Image = System.Drawing.Image.FromFile("C:\خطا.png")
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If RadioButton1.Checked = True Then
i = w * m
Box1. = i
PictureBox1.Visible = True
PictureBox2.Visible = False
Else
PictureBox2.Visible = True
PictureBox1.Visible = False
End If
If RadioButton2.Checked = True Then
i = w / m
Box1. = i
PictureBox1.Visible = True
PictureBox2.Visible = False
Else
PictureBox2.Visible = True
PictureBox1.Visible = False
End If
If RadioButton3.Checked = True Then
i = w + m
Box1. = i
PictureBox1.Visible = True
PictureBox2.Visible = False
Else
PictureBox2.Visible = True
PictureBox1.Visible = False
End If
If RadioButton3.Checked = True Then
i = w - m
Box1. = i
PictureBox1.Visible = True
PictureBox2.Visible = False
Else
PictureBox2.Visible = True
PictureBox1.Visible = False
End If
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
i = w * m
Box1. = i
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
i = w ِ\ m
Box1. = i
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
i = w + m
Box1. = i
End Sub
Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
i = w - m
Box1. = i
End Sub
End Class