المواضيع الأخيرة
اللعب عالمكشوف ... لمن يملك الطرنيب
7/10/2016, 11:43 am من طرف الأمين العام
اللعب عالمكشوف ... لمن يملك الطرنيب
بعد ست سنوات من الحرب الطاحنة و التخفي لكل دولة وراء الدعم المقدم لقوى …
بعد ست سنوات من الحرب الطاحنة و التخفي لكل دولة وراء الدعم المقدم لقوى …
تعاليق: 0
مبروك لقطر مبروك للخليج
5/8/2015, 6:58 pm من طرف الأمين العام
مبروك لقطر مبروك للخليج ....
من كأس النخوة التفخيخية و الهيجان العاهر اشربوا ....
من كأس الحقد و السقاطة و التآمر …
من كأس النخوة التفخيخية و الهيجان العاهر اشربوا ....
من كأس الحقد و السقاطة و التآمر …
تعاليق: 0
عاجل جدا .... رؤيا نتمنى أن تلقى آذان صاغية .
12/7/2015, 8:24 pm من طرف الأمين العام
عاجل جدا .... رؤيا نتمنى أن تلقى آذان صاغية .
سلمية الأمان سلمية المحبة هناك من يحاول إثارة فتيل الفتنة و الخراب …
سلمية الأمان سلمية المحبة هناك من يحاول إثارة فتيل الفتنة و الخراب …
تعاليق: 0
ماذا بعد يا صاحب القرار
9/7/2015, 9:41 pm من طرف الأمين العام
ماذا بعد يا صاحب القرار .....
هاهو التلفزيون السوري الرسمي يفصحُ بما عجزَ عنه الناس .. ويفضحُ بما لا يقبل الشك …
هاهو التلفزيون السوري الرسمي يفصحُ بما عجزَ عنه الناس .. ويفضحُ بما لا يقبل الشك …
تعاليق: 0
الشعب يتساءل ......
7/7/2015, 9:54 pm من طرف الأمين العام
بيان :
الشعب يتساءل ......
إننا لا نتكلم في السياسة لان السياسة بأساسها هي علاقة أوجدها الإنسان ليستطيع من …
الشعب يتساءل ......
إننا لا نتكلم في السياسة لان السياسة بأساسها هي علاقة أوجدها الإنسان ليستطيع من …
تعاليق: 0
المجموعة العلشرة فيجوال بيزيك
صفحة 1 من اصل 1
المجموعة العلشرة فيجوال بيزيك
مربعات الحوار الشائعةThe Common Dialog Box
أوامر النداء لصناديق الحوار:
common Dialog1.showopen إظهار صندوق فتح الملفات. وتأخذ الرقم 1
common Dialog1.showSave إظهار صندوق حفظ الملفات. وتأخذ الرقم 2
common Dialog1.showColor إظهار صندوق انتخاب الألوان. وتأخذ الرقم 3
common Dialog1.showFont إظهار صندوق انتخاب الخطوط. وتأخذ الرقم 4
common Dialog1.showPrinter إظهار صندوق إعدادات الطابعة. وتأخذ الرقم 5
ويتم إحضار الأداة المسماة Common Dialog من مستودع الأدوات الرئيسي (Ctrl + T):
مثال13: لدينا n والمطلوب كتابة الكود الخاص بالنافذة التالية:
[color=red]Dim n, data[color:1d8f=red:1d8f]
[color=red]Function dis(x1, x2, y1, y2)[color:1d8f=red:1d8f]
dis = Sqr((x1 - x2) ^ 2 + (y1 - y2) ^ 2)
End Function
[color=red]Sub nerx(x(), y(), n, y1, y2)[color:1d8f=red:1d8f]
y1 = e50
y2 = e50
For i = 1 To n
If y(i) < s Then x1 = y(i)
If y(i) < s And y(i) > 0 And y(i) > 0 Then y2 = y(i)
Next i
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub bacolor_Click()[color:1d8f=red:1d8f]
cmd1.Action = 3
gxy.BackColorBkg = cmd1.color
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub celcolor_Click()[color:1d8f=red:1d8f]
cmd1.Action = 3
gxy.BackColor = cmd1.color
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub Command1_Click()[color:1d8f=red:1d8f]
n = Val(Text1.Text)
ReDim x(n), y(n)
For i = 1 To n
x(i) = Val(gxy.TextMatrix(i, 1))
y(i) = Val(gxy.TextMatrix(i, 2))
Next i
If Check1.Value = 1 Then
s = 1E+50: k = 0
If Option1.Value = True Then
For i = 1 To n
If y(i) < s And x(i) > 0 And y(i) > 0 Then
s = y(i): k = i
End If
Next i
Else
For i = 1 To n
If x(i) < s And x(i) > 0 And y(i) > 0 Then
s = x(i): k = i
End If
Next i
End If
Else
s = 1E+50: k = 0
If Option1.Value = True Then
For i = 1 To n
If y(i) < s Then
s = y(i): k = i
End If
Next i
Else
For i = 1 To n
If x(i) < s Then
s = x(i): k = i
End If
Next i
End If
End If
Text2.Text = k
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub Form_Load()[color:1d8f=red:1d8f]
gxy.TextMatrix(0, 0) = "الرقم"
gxy.TextMatrix(0, 1) = "x"
gxy.TextMatrix(0, 2) = "y"
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub gxy_Click()[color:1d8f=red:1d8f]
gxy.Text = ""
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub gxy_KeyPress(KeyAscii As Integer)[color:1d8f=red:1d8f]
gxy.Text = gxy.Text + Chr(KeyAscii)
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub open_Click()[color:1d8f=red:1d8f]
cmd1.Filter = "datafile|*.dat|all file|*.*"
cmd1.CancelError = False
On orror GoTo errorhandler
cmd1.Action = 1
a$ = cmd1.filename
If a$ = "" Then Exit Sub
Open a$ For Input As 1
Input #1, n
ReDim x(n), y(n)
gxy.Rows = n + 1
For i = 1 To n
Input #1, x(i), y(i)
Next i
Close #1
Text1.Text = n
For i = 1 To n
gxy.TextMatrix(i, 1) = x(i)
gxy.TextMatrix(i, 2) = y(i)
Next i
errorhandler:
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub save_Click()[color:1d8f=red:1d8f]
cmd1.Filter = "datafile|*.dat|all file|*.*"
cmd1.CancelError = False
On orror GoTo errorhandler
cmd1.Action = 2
a$ = cmd1.filename
If a$ = "" Then Exit Sub
n = Val(Text1)
ReDim x(n), y(n)
For i = 1 To n
x(i) = Val(gxy.TextMatrix(i, 1))
y(i) = Val(gxy.TextMatrix(i, 2))
Next i
Open a$ For Output As 1
Write #1, n
For i = 1 To n
Write #1, i, x(i), y(i)
Next i
Close #1
errorhandler:
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub Text1_Change()[color:1d8f=red:1d8f]
n = Val(Text1.Text)
gxy.Rows = n + 1
For i = 1 To n
gxy.TextMatrix(i, 0) = i
Next i
[color=red]End Sub[color:1d8f=red:1d8f]
بعض التوابع:
nomber1 mod nomber2
len(txt)
mid(txt,no1,no2)
أوامر النداء لصناديق الحوار:
common Dialog1.showopen إظهار صندوق فتح الملفات. وتأخذ الرقم 1
common Dialog1.showSave إظهار صندوق حفظ الملفات. وتأخذ الرقم 2
common Dialog1.showColor إظهار صندوق انتخاب الألوان. وتأخذ الرقم 3
common Dialog1.showFont إظهار صندوق انتخاب الخطوط. وتأخذ الرقم 4
common Dialog1.showPrinter إظهار صندوق إعدادات الطابعة. وتأخذ الرقم 5
ويتم إحضار الأداة المسماة Common Dialog من مستودع الأدوات الرئيسي (Ctrl + T):
مثال13: لدينا n والمطلوب كتابة الكود الخاص بالنافذة التالية:
[color=red]Dim n, data[color:1d8f=red:1d8f]
[color=red]Function dis(x1, x2, y1, y2)[color:1d8f=red:1d8f]
dis = Sqr((x1 - x2) ^ 2 + (y1 - y2) ^ 2)
End Function
[color=red]Sub nerx(x(), y(), n, y1, y2)[color:1d8f=red:1d8f]
y1 = e50
y2 = e50
For i = 1 To n
If y(i) < s Then x1 = y(i)
If y(i) < s And y(i) > 0 And y(i) > 0 Then y2 = y(i)
Next i
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub bacolor_Click()[color:1d8f=red:1d8f]
cmd1.Action = 3
gxy.BackColorBkg = cmd1.color
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub celcolor_Click()[color:1d8f=red:1d8f]
cmd1.Action = 3
gxy.BackColor = cmd1.color
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub Command1_Click()[color:1d8f=red:1d8f]
n = Val(Text1.Text)
ReDim x(n), y(n)
For i = 1 To n
x(i) = Val(gxy.TextMatrix(i, 1))
y(i) = Val(gxy.TextMatrix(i, 2))
Next i
If Check1.Value = 1 Then
s = 1E+50: k = 0
If Option1.Value = True Then
For i = 1 To n
If y(i) < s And x(i) > 0 And y(i) > 0 Then
s = y(i): k = i
End If
Next i
Else
For i = 1 To n
If x(i) < s And x(i) > 0 And y(i) > 0 Then
s = x(i): k = i
End If
Next i
End If
Else
s = 1E+50: k = 0
If Option1.Value = True Then
For i = 1 To n
If y(i) < s Then
s = y(i): k = i
End If
Next i
Else
For i = 1 To n
If x(i) < s Then
s = x(i): k = i
End If
Next i
End If
End If
Text2.Text = k
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub Form_Load()[color:1d8f=red:1d8f]
gxy.TextMatrix(0, 0) = "الرقم"
gxy.TextMatrix(0, 1) = "x"
gxy.TextMatrix(0, 2) = "y"
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub gxy_Click()[color:1d8f=red:1d8f]
gxy.Text = ""
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub gxy_KeyPress(KeyAscii As Integer)[color:1d8f=red:1d8f]
gxy.Text = gxy.Text + Chr(KeyAscii)
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub open_Click()[color:1d8f=red:1d8f]
cmd1.Filter = "datafile|*.dat|all file|*.*"
cmd1.CancelError = False
On orror GoTo errorhandler
cmd1.Action = 1
a$ = cmd1.filename
If a$ = "" Then Exit Sub
Open a$ For Input As 1
Input #1, n
ReDim x(n), y(n)
gxy.Rows = n + 1
For i = 1 To n
Input #1, x(i), y(i)
Next i
Close #1
Text1.Text = n
For i = 1 To n
gxy.TextMatrix(i, 1) = x(i)
gxy.TextMatrix(i, 2) = y(i)
Next i
errorhandler:
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub save_Click()[color:1d8f=red:1d8f]
cmd1.Filter = "datafile|*.dat|all file|*.*"
cmd1.CancelError = False
On orror GoTo errorhandler
cmd1.Action = 2
a$ = cmd1.filename
If a$ = "" Then Exit Sub
n = Val(Text1)
ReDim x(n), y(n)
For i = 1 To n
x(i) = Val(gxy.TextMatrix(i, 1))
y(i) = Val(gxy.TextMatrix(i, 2))
Next i
Open a$ For Output As 1
Write #1, n
For i = 1 To n
Write #1, i, x(i), y(i)
Next i
Close #1
errorhandler:
[color=red]End Sub[color:1d8f=red:1d8f]
[color=red]Private Sub Text1_Change()[color:1d8f=red:1d8f]
n = Val(Text1.Text)
gxy.Rows = n + 1
For i = 1 To n
gxy.TextMatrix(i, 0) = i
Next i
[color=red]End Sub[color:1d8f=red:1d8f]
بعض التوابع:
nomber1 mod nomber2
len(txt)
mid(txt,no1,no2)
صفحة 1 من اصل 1
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى
29/7/2017, 11:29 am من طرف جبران جمول
» متى ستصحو وزارتي التربية والتعليم العالي
8/7/2017, 5:33 pm من طرف جبران جمول
» قليلا من الصدق يا محللين
2/7/2017, 7:29 pm من طرف جبران جمول
» امريكا وطبيعة المفاهيم والعقائد السائدة
28/6/2017, 7:59 am من طرف جبران جمول
» فلم خيالي من الواقع
7/6/2017, 4:02 pm من طرف جبران جمول
» مناهجنا
5/6/2017, 8:30 pm من طرف جبران جمول
» اللعب عالمكشوف ... لمن يملك الطرنيب
7/10/2016, 11:43 am من طرف الأمين العام
» خبير أمريكي: "الرواية الرسمية لعمليات سبتمبر الإرهابية مزيفة
13/9/2016, 9:33 am من طرف جبران جمول
» ماذا عن الاله بعل بعض المعلومات
6/8/2016, 12:20 pm من طرف جبران جمول
» سلمية تحارب بالكهرباء بالمياه
12/7/2016, 7:27 pm من طرف جبران جمول
» أسئلة برسم الفقهاء والعلماء فهل من مجيب
12/7/2016, 7:13 pm من طرف جبران جمول
» متى نبتعد عن السلفية في افكارنا .؟
8/7/2016, 11:12 am من طرف جبران جمول
» مبروك لقطر مبروك للخليج
5/8/2015, 6:58 pm من طرف الأمين العام
» ممثل الرئيس في سلمية لحل الأزمة
16/7/2015, 11:07 pm من طرف الأمين العام
» عاجل جدا .... رؤيا نتمنى أن تلقى آذان صاغية .
12/7/2015, 8:24 pm من طرف الأمين العام