بتاريخ: 8 نوفمبر 201015 سنة comment_203238 السلام عليكم جميعاً... هذه بعض البرامج البسيطة الي طبقتها أثناء دراستي لمادة برمجة1 لدبلوم البرمجة رح أرفق صوره الفورم مع الكود أتمنى أنكم تستفيدوا منه ... 1/ برنامج جدول الضرب Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim x, y As Integer For x = 1 To 10 For y = 1 To 10 MessageBox.Show(x & " * " & y & " = " & x * y) Next y If MessageBox.Show("Do You Wont To Stop??", "Stop", MessageBoxButtons.YesNo) = DialogResult.Yes Then Exit For Next x End Sub 2/ برنامج الجمع وإظهار النتيجه عدد صحيح Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim num1, num2, sum As Integer sum = CInt(TextBox1.Text) + CInt(TextBox2.Text) TextBox3.Text = sum End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim mydouble As Double Dim myinteger As Integer mydouble = InputBox("Enter double number") myinteger = CInt(mydouble) MessageBox.Show(myinteger) End Sub 3/ صلاحية للدخول (فحص إسم المستخدم وكلملة المرور) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim UserName As String Dim PassWord As Integer UserName = TextBox1.Text PassWord = TextBox2.Text If UserName = "enrique" And PassWord = "11111" Then MessageBox.Show("الإدخال صحيح") Else MessageBox.Show("الإدخال خاطئ حاول مرة أخرى") End If End Sub 4/ تطبيق بسيط على الإغلاق وإضهار رسالة ترحيبية Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MessageBox.Show("أهلا وسهلا بكم") End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click MessageBox.Show("خروج من البرنامج") End End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim x As Control For Each x In Controls x.BackColor = Color.Gold Next End Sub 5/ حلقة لتكرار حساب المكافأه Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim salary, reward As Double Do salary = InputBox("Enter the Salary") reward = salary * 0.5 MessageBox.Show("The Reward = " & reward) Loop While salary > 0 End Sub 6/ برنامج جمع عددين Sub hello(ByVal name As String) MessageBox.Show("welcom:" & name) End Sub Function add(ByVal num1 As Integer, ByVal num2 As Integer) num1 = textbox1.text num2 = textbox2.text Return num1 + num2 End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim firstname As String firstname = InputBox("enter your name plz") Call hello(firstname) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim x, y As Integer TextBox3.Text = add(x, y) End Sub 7/ برنامج حساب المساحة والمحيط Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim radius, area, circumference As Double Const pi As Double = 3.1415 radius = InputBox("Enter the radius") area = pi * radius ^ 2 circumference = 2 * pi * radius MessageBox.Show("The area = " & area) MessageBox.Show("the circumference = " & circumference) End Sub 8/ برنامج إظهار الرقم الأكبر Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b As Integer a = InputBox("Enter the value of a") b = InputBox("Enter the value of b") If a > b Then MessageBox.Show("the Big number is :" & a) Else MessageBox.Show("the Big number is :" & End If End Sub 9/ برنامج حساب رقم الزائر Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Static num As Integer num = num + 1 MessageBox.Show(" you are user no: " & num) End Sub 10/ تطبيق بسيط على تغير لون الكائن ومكان النص Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MessageBox.Show(TextBox1.Text) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.BackColor = Color.CadetBlue End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.ForeColor = Color.Red End Sub Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click Beep() Me.Close() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Me.Hide() End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Me.CenterToScreen() End Sub صورة الواجهات ... Doc1.doc البرامج بسيطة وهي عباره عن واجبات كنا ناخذها بالمعهد لكن أرفقتها لتعم الفائده فقط ** دعــــــاء فــي ظــهــر الــغــيــب يــكــفــيــنــي ** تقديم بلاغ
بتاريخ: 8 نوفمبر 201015 سنة comment_203240 شكرا اخى فعلا برامج مفيدة بالرغم من ان الموقع خاص باوراكل ولكن البرامج اغلبها تعتمد على loop - if statement فعلا مفيدة جدا الى الامام تقديم بلاغ
بتاريخ: 8 نوفمبر 201015 سنة كاتب الموضوع comment_203269 شكراً لك أخي الكريم ... أسعدني مرورك تقديم بلاغ
بتاريخ: 8 نوفمبر 201015 سنة comment_203294 السلام عليكم ورحمة الله اخي الفاضل / انريكيجزاك الله خيرا ... وهذا ما تعودنا عليه من حسن كرمك تقديم بلاغ
بتاريخ: 8 نوفمبر 201015 سنة كاتب الموضوع comment_203295 أشــكــركـ أخ أمــجـــد ... أسعدني مرورك الكــريــم . تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.