::
::
السلامے عليكمے ورحمة اللهے وبركاتهے
::
::
اخواني اعضاء منتدى البرمجة
والله من كثر ما اسأل لكن انتوا كريمين
وفيكم الخير والبركة
بادية في عمل مشروع ما
لكن اثناء كتابتي لكود معين لم يتم تنفيذة
ويظهر لي الـ
Break
انظرو لهذ الصورة التالية
http://www.9q9q.org/index.php?image=2lrpoKmLjGHg
خطوات العمل
عند الضغط من ال ComboBox1 احدى الخيارات ولنفرض الخيار الأول
يظهر في الـ RichTextBox مستند نص تم استدعاؤة وهو وضوع في نفس مجلد الـ Bin
وأيضاً في PictureBox1
تم استخدام هذا الكود ولكن لم يعمل بل يظهر الـ
RichTextBox1.LoadFile(Application.StartupPath + "/Texts/2.txt", RichTextBoxStreamType.PlainText)
PictureBox1.Image = Image.FromFile(Application.StartupPath + "/images/g.jpeg")
Else
If ComboBox1.SelectedIndex = 1 Then
RichTextBox1.LoadFile(Application.StartupPath + "/Texts/3.txt", RichTextBoxStreamType.PlainText)
Else
If ComboBox1.SelectedIndex = 2 Then
RichTextBox1.LoadFile(Application.StartupPath + "/Texts/4.txt", RichTextBoxStreamType.PlainText)
Else
If ComboBox1.SelectedIndex = 3 Then
RichTextBox1.LoadFile(Application.StartupPath + "/Texts/5.txt", RichTextBoxStreamType.PlainText)
Else
If ComboBox1.SelectedIndex = 4 Then
RichTextBox1.LoadFile(Application.StartupPath + "/Texts/6.txt", RichTextBoxStreamType.PlainText)
Else
If ComboBox1.SelectedIndex = 5 Then
RichTextBox1.LoadFile(Application.StartupPath + "/Texts/7.txt", RichTextBoxStreamType.PlainText)
Else
If ComboBox1.SelectedIndex = 6 Then
RichTextBox1.LoadFile(Application.StartupPath + "/Texts/8.txt", RichTextBoxStreamType.PlainText)
End If
End If
End If
End If
End If
End If
End If
End Sub
If ComboBox1.SelectedIndex = 0 Then
هنا طبقت على اختيار واحد فقط وهو الأول ولكن لا يعمل
بل يظهر لي Break
في هذا السطر
PictureBox1.Image = Image.FromFile(Application.StartupPath + "/images/g.jpeg")