<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب  - قسم مكتبة اكواد VB.NET]]></title>
		<link>https://vb4arb.com/vb/</link>
		<description><![CDATA[منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب  - https://vb4arb.com/vb]]></description>
		<pubDate>Wed, 22 Apr 2026 14:27:07 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[BBCodeParser]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=55802</link>
			<pubDate>Sun, 07 Dec 2025 10:08:21 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=56138">justforit</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=55802</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله و بركاته</div>
<div style="text-align: center;" class="mycode_align">المرفق هو عبارة عن كلاس تحويل اكواد الـbbcode الى مثيلاتها بــhtml</div>
<div style="text-align: center;" class="mycode_align">password:vb4arb</div>
<br />
<div style="text-align: center;" class="mycode_align">طبعا تحتاج تنزيل مراجع عن طريق NuGet حتما ستعرفها باذن الله عند وجود اي خطأ</div>
<div style="text-align: center;" class="mycode_align">تستطيع التعديل عليها مثل ما فلعلت انا بها من قبل.</div>
<div style="text-align: center;" class="mycode_align">يمكنك الاستغناء عن sanitizer بحذفها فهي تنظف(حسب اللذي فهمته عنها) النص من اي خطورة او استغلال.</div><br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/zip.gif" title="ZIP File" border="0" alt=".zip" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=30155" target="_blank" title="">BBCodeParser.zip</a> (الحجم : 824 بايت / التحميلات : 6)
]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله و بركاته</div>
<div style="text-align: center;" class="mycode_align">المرفق هو عبارة عن كلاس تحويل اكواد الـbbcode الى مثيلاتها بــhtml</div>
<div style="text-align: center;" class="mycode_align">password:vb4arb</div>
<br />
<div style="text-align: center;" class="mycode_align">طبعا تحتاج تنزيل مراجع عن طريق NuGet حتما ستعرفها باذن الله عند وجود اي خطأ</div>
<div style="text-align: center;" class="mycode_align">تستطيع التعديل عليها مثل ما فلعلت انا بها من قبل.</div>
<div style="text-align: center;" class="mycode_align">يمكنك الاستغناء عن sanitizer بحذفها فهي تنظف(حسب اللذي فهمته عنها) النص من اي خطورة او استغلال.</div><br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/zip.gif" title="ZIP File" border="0" alt=".zip" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=30155" target="_blank" title="">BBCodeParser.zip</a> (الحجم : 824 بايت / التحميلات : 6)
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[إجراء تصحيح اسماء الصور ليتناسب مع برنامج ffmpeg]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=55365</link>
			<pubDate>Sun, 19 Oct 2025 00:32:40 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=56138">justforit</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=55365</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">بسم الله الرحمنالرحيم </div>
<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله و بركاته</div>
<div style="text-align: center;" class="mycode_align">الكود التالي توصلت له بعد تعب مع برنامج ffmpeg فالتعامل معه لا بد من  الدقة.</div>
<div style="text-align: center;" class="mycode_align">اليكم الاجراء</div>
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>Sub repairimagesnames(imagespath As String)<br />
     Dim i As Integer = 0<br />
     Dim pics() As String = Directory.GetFiles(imagespath, "*.png")<br />
     If pics.Count &gt; 0 Then<br />
         Dim c As Integer = pics.Count<br />
         Dim d As Integer = Len(c.ToString())<br />
         Dim strname As String = StrDup(d, "0")<br />
         For i = 0 To c - 1<br />
             On Error Resume Next<br />
             Dim fn As String = pics(i)<br />
             If Path.GetExtension(fn).ToString.ToLower = ".wav" Then Continue For<br />
             Dim newname As String = i.ToString(strname) &amp; ".png"<br />
             My.Computer.FileSystem.RenameFile(fn, newname)<br />
         Next<br />
         MsgBox("تم تصحيح اسماء الصور", MsgBoxStyle.Exclamation, "")<br />
     End If<br />
 End Sub</code></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">بسم الله الرحمنالرحيم </div>
<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله و بركاته</div>
<div style="text-align: center;" class="mycode_align">الكود التالي توصلت له بعد تعب مع برنامج ffmpeg فالتعامل معه لا بد من  الدقة.</div>
<div style="text-align: center;" class="mycode_align">اليكم الاجراء</div>
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>Sub repairimagesnames(imagespath As String)<br />
     Dim i As Integer = 0<br />
     Dim pics() As String = Directory.GetFiles(imagespath, "*.png")<br />
     If pics.Count &gt; 0 Then<br />
         Dim c As Integer = pics.Count<br />
         Dim d As Integer = Len(c.ToString())<br />
         Dim strname As String = StrDup(d, "0")<br />
         For i = 0 To c - 1<br />
             On Error Resume Next<br />
             Dim fn As String = pics(i)<br />
             If Path.GetExtension(fn).ToString.ToLower = ".wav" Then Continue For<br />
             Dim newname As String = i.ToString(strname) &amp; ".png"<br />
             My.Computer.FileSystem.RenameFile(fn, newname)<br />
         Next<br />
         MsgBox("تم تصحيح اسماء الصور", MsgBoxStyle.Exclamation, "")<br />
     End If<br />
 End Sub</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[أخذ ايقونة من صورة و حفظها]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=55358</link>
			<pubDate>Wed, 15 Oct 2025 21:00:18 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=56138">justforit</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=55358</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>Public Sub Ticon(imgpath As String, iconpath As String)<br />
     Dim bmp As New Bitmap(Image.FromFile(imgpath))<br />
     Dim iconHandle = bmp.GetHicon()<br />
     Dim icon As Icon = Icon.FromHandle(iconHandle)<br />
     Using fs As New FileStream(iconpath, FileMode.Create)<br />
         icon.Save(fs)<br />
     End Using<br />
 End Sub</code></div></div><br />
<div style="text-align: center;" class="mycode_align">هذا الاجراء يحفظه مباشرة الى المسار المرسل</div>
<div style="text-align: center;" class="mycode_align">الان يعمل ولا ادري ماهو سر عدم عمله في وقت مضى!</div>]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>Public Sub Ticon(imgpath As String, iconpath As String)<br />
     Dim bmp As New Bitmap(Image.FromFile(imgpath))<br />
     Dim iconHandle = bmp.GetHicon()<br />
     Dim icon As Icon = Icon.FromHandle(iconHandle)<br />
     Using fs As New FileStream(iconpath, FileMode.Create)<br />
         icon.Save(fs)<br />
     End Using<br />
 End Sub</code></div></div><br />
<div style="text-align: center;" class="mycode_align">هذا الاجراء يحفظه مباشرة الى المسار المرسل</div>
<div style="text-align: center;" class="mycode_align">الان يعمل ولا ادري ماهو سر عدم عمله في وقت مضى!</div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[استخدام متغير عام لتخزين مثيل الفــورم]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=53127</link>
			<pubDate>Tue, 13 May 2025 12:17:23 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=14092">مصمم هاوي</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=53127</guid>
			<description><![CDATA[كنتُ أعانـي من مشكلة إنشاء مثيل جديد من الفــورم في كل مرة أضغط  فيه بوتن فتح الفـورم على الزر. <br />
والذي يؤدي بدوره يؤدي إلى فتح نسخ متعددة من الفورم.<br />
<br />
هذا الكود التي كنت أعاني منه<br />
<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code> Dim frm As New FormSemester1 : frm.MdiParent = Me : frm.Show() ()</code></div></div><br />
ولكن  بعد نصيحـة الأستاذ الحبيب طه أردت أن أجرب المتغيرات فوجدتُ فرقاً كبيراً وسرعةً كبيرة <br />
ومن تم استخدمت متغير عام  لتخزين مثيل الفــورم ، ثم التحقق من الفـورم إذا كان المثيل موجودًا بالفعل قبل إنشاء مثيل جديد.<br />
<br />
مثـلاً عند فتح الفـورم  (FormDocuments)<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>Dim frmDocuments As FormDocuments<br />
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click<br />
    If frmDocuments Is Nothing OrElse frmDocuments.IsDisposed Then<br />
        frmDocuments = New FormDocuments<br />
        frmDocuments.MdiParent = Me<br />
        frmDocuments.Show()<br />
    Else<br />
        frmDocuments.Activate()<br />
    End If<br />
<br />
End Sub</code></div></div>]]></description>
			<content:encoded><![CDATA[كنتُ أعانـي من مشكلة إنشاء مثيل جديد من الفــورم في كل مرة أضغط  فيه بوتن فتح الفـورم على الزر. <br />
والذي يؤدي بدوره يؤدي إلى فتح نسخ متعددة من الفورم.<br />
<br />
هذا الكود التي كنت أعاني منه<br />
<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code> Dim frm As New FormSemester1 : frm.MdiParent = Me : frm.Show() ()</code></div></div><br />
ولكن  بعد نصيحـة الأستاذ الحبيب طه أردت أن أجرب المتغيرات فوجدتُ فرقاً كبيراً وسرعةً كبيرة <br />
ومن تم استخدمت متغير عام  لتخزين مثيل الفــورم ، ثم التحقق من الفـورم إذا كان المثيل موجودًا بالفعل قبل إنشاء مثيل جديد.<br />
<br />
مثـلاً عند فتح الفـورم  (FormDocuments)<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>Dim frmDocuments As FormDocuments<br />
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click<br />
    If frmDocuments Is Nothing OrElse frmDocuments.IsDisposed Then<br />
        frmDocuments = New FormDocuments<br />
        frmDocuments.MdiParent = Me<br />
        frmDocuments.Show()<br />
    Else<br />
        frmDocuments.Activate()<br />
    End If<br />
<br />
End Sub</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[كود لقياس الوقت المستغرق لتنفيذ أي كود]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=52995</link>
			<pubDate>Tue, 06 May 2025 16:29:09 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=30072">princelovelorn</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=52995</guid>
			<description><![CDATA[السلام عليكم ورحمة الله وبركاته<br />
كود بسيط جدا أرجو أن يفيدكم<br />
وهو لمعرفة الوقت المستغرق في تنفيذ أي كود <br />
<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>Dim sw As New Stopwatch()<br />
sw.Start() ' بدء التوقيت<br />
' يمكنك التحكم في وقت الأختبار بزيادة العدد 100 في حلقة for<br />
For i As Integer = 1 To 100<br />
    ' ضع الكود المراد قياس سرعة تنفيذه هنا<br />
Next<br />
<br />
sw.Stop() ' إيقاف التوقيت<br />
<br />
Console.WriteLine("الوقت المنقضي: " &amp; sw.ElapsedMilliseconds &amp; " مللي ثانية")</code></div></div>]]></description>
			<content:encoded><![CDATA[السلام عليكم ورحمة الله وبركاته<br />
كود بسيط جدا أرجو أن يفيدكم<br />
وهو لمعرفة الوقت المستغرق في تنفيذ أي كود <br />
<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>Dim sw As New Stopwatch()<br />
sw.Start() ' بدء التوقيت<br />
' يمكنك التحكم في وقت الأختبار بزيادة العدد 100 في حلقة for<br />
For i As Integer = 1 To 100<br />
    ' ضع الكود المراد قياس سرعة تنفيذه هنا<br />
Next<br />
<br />
sw.Stop() ' إيقاف التوقيت<br />
<br />
Console.WriteLine("الوقت المنقضي: " &amp; sw.ElapsedMilliseconds &amp; " مللي ثانية")</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[طلب مساعده كود يجبر دقة الشاشه في مقاس معين]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=52240</link>
			<pubDate>Fri, 14 Mar 2025 10:57:53 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=60698">قاسم اليافعي</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=52240</guid>
			<description><![CDATA[بسم الله الرحمن الرحيم<br />
<br />
<br />
السلام عليكم ورحمة الله وبركاته<br />
<br />
<br />
ماهو الكود الذي يمكنني من تغيير دقة الشاشة الى دقة محددة ( مثلا الى دقة 1366 *768)<br />
بس يكون كود جاهز ينحط في كل فورم<br />
ولكم جزيل الشكر]]></description>
			<content:encoded><![CDATA[بسم الله الرحمن الرحيم<br />
<br />
<br />
السلام عليكم ورحمة الله وبركاته<br />
<br />
<br />
ماهو الكود الذي يمكنني من تغيير دقة الشاشة الى دقة محددة ( مثلا الى دقة 1366 *768)<br />
بس يكون كود جاهز ينحط في كل فورم<br />
ولكم جزيل الشكر]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[سؤال]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=51771</link>
			<pubDate>Mon, 17 Feb 2025 19:50:35 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=60556">dwidar07@gmail.com</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=51771</guid>
			<description><![CDATA[التعليمة مكتوبة بهذه الطريقى :<br />
<br />
<br />
Me.TextBox1.Text = dgvList.Rows.Count - 1'<br />
<br />
 TextBox1.Text = dgvList.Rows(0).Cells(1).Value<br />
<br />
البرنامج مصمم على تنفيذ التعليمة الاولى المعلقة و تجاهل الثانية الفعالة.<br />
و كل المحاولات فشلت. حتى بحذف التعليمة المعلقة ينفيذه .<br />
<br />
ثانيا <br />
يحدث ان اضيف عنصر للشاشة (مربع نص ,, زر ...) لكنه لا يظهر وقا التنفيذ , يختفي مع انه وقت التصميم موجود و يمكن العمل معه.<br />
افيدونا افادكم الله.]]></description>
			<content:encoded><![CDATA[التعليمة مكتوبة بهذه الطريقى :<br />
<br />
<br />
Me.TextBox1.Text = dgvList.Rows.Count - 1'<br />
<br />
 TextBox1.Text = dgvList.Rows(0).Cells(1).Value<br />
<br />
البرنامج مصمم على تنفيذ التعليمة الاولى المعلقة و تجاهل الثانية الفعالة.<br />
و كل المحاولات فشلت. حتى بحذف التعليمة المعلقة ينفيذه .<br />
<br />
ثانيا <br />
يحدث ان اضيف عنصر للشاشة (مربع نص ,, زر ...) لكنه لا يظهر وقا التنفيذ , يختفي مع انه وقت التصميم موجود و يمكن العمل معه.<br />
افيدونا افادكم الله.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[ُError نتيجة الجمع بين الراميتر من نوع Array  مع بارميتر من نوع Optional]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=50305</link>
			<pubDate>Sun, 15 Sep 2024 11:55:20 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=57743">Mostchar</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=50305</guid>
			<description><![CDATA[تحياتي لطاقم الادارة والاخوة الاعضاء بالمنتدى المحترم - وكل عام وانتم بخير بمناسبة المولد النبوي الشريف<br />
أرجو من لدية حل لمشكلة الجمع بين بارميتر من نوع مصفوفة مع بارميتر من النوع الاختياري أن يوافينا به ولكم جزيل الشكر .. مثال المشكلة كالتالي:_<br />
<br />
(ByVal ParamArray Cont() As System.Windows.Forms.Control, Optional ByVal FldCont As System.Windows.Forms.Control = Nothing)]]></description>
			<content:encoded><![CDATA[تحياتي لطاقم الادارة والاخوة الاعضاء بالمنتدى المحترم - وكل عام وانتم بخير بمناسبة المولد النبوي الشريف<br />
أرجو من لدية حل لمشكلة الجمع بين بارميتر من نوع مصفوفة مع بارميتر من النوع الاختياري أن يوافينا به ولكم جزيل الشكر .. مثال المشكلة كالتالي:_<br />
<br />
(ByVal ParamArray Cont() As System.Windows.Forms.Control, Optional ByVal FldCont As System.Windows.Forms.Control = Nothing)]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[سؤال للاعضاء]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=49586</link>
			<pubDate>Tue, 16 Jul 2024 18:51:36 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=59050">mohsen2024</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=49586</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">السلام عليكم ورحمة الله وبركاتة </span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">انا جديد في القروب فيجوال بيسك انا مبرمج على </span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">فيجوال بيسك 6 وانظممت حديثا الي فيجوال استوديو دوت نت </span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">انا الان منزل فيجوال استوديو 2015 </span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">السؤال الان هل الكريستال ريبورت مدمج ضمنياً مع الفيجوال</span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">ام يجب ان انزلة لوحدة كا برنامج مستقل </span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">وشكراً</span></span></span></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">السلام عليكم ورحمة الله وبركاتة </span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">انا جديد في القروب فيجوال بيسك انا مبرمج على </span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">فيجوال بيسك 6 وانظممت حديثا الي فيجوال استوديو دوت نت </span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">انا الان منزل فيجوال استوديو 2015 </span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">السؤال الان هل الكريستال ريبورت مدمج ضمنياً مع الفيجوال</span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">ام يجب ان انزلة لوحدة كا برنامج مستقل </span></span></span></div>
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="font-family: Arial Black;" class="mycode_font">وشكراً</span></span></span></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[ملء قائمة نصية من ملف نصي عند تعريفها مباشرة]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=48946</link>
			<pubDate>Sat, 01 Jun 2024 22:53:58 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=56138">justforit</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=48946</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله و بركاته</div>
<div style="text-align: center;" class="mycode_align">لم اكن اتوقع انه يمكن التعريف والتعبئة في منطقة التصريحات العامة هكذا:</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB"> &nbsp; Dim&nbsp;lst&nbsp;</span><span style="color: #007700">As&nbsp;New&nbsp;List(</span><span style="color: #0000BB">Of&nbsp;String</span><span style="color: #007700">)(</span><span style="color: #0000BB">IO</span><span style="color: #007700">.</span><span style="color: #0000BB">File</span><span style="color: #007700">.</span><span style="color: #0000BB">ReadLines</span><span style="color: #007700">(</span><span style="color: #DD0000">"C:&#092;Users&#092;myname&#092;Desktop&#092;cities.txt"</span><span style="color: #007700">))&nbsp;<br /></span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله و بركاته</div>
<div style="text-align: center;" class="mycode_align">لم اكن اتوقع انه يمكن التعريف والتعبئة في منطقة التصريحات العامة هكذا:</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB"> &nbsp; Dim&nbsp;lst&nbsp;</span><span style="color: #007700">As&nbsp;New&nbsp;List(</span><span style="color: #0000BB">Of&nbsp;String</span><span style="color: #007700">)(</span><span style="color: #0000BB">IO</span><span style="color: #007700">.</span><span style="color: #0000BB">File</span><span style="color: #007700">.</span><span style="color: #0000BB">ReadLines</span><span style="color: #007700">(</span><span style="color: #DD0000">"C:&#092;Users&#092;myname&#092;Desktop&#092;cities.txt"</span><span style="color: #007700">))&nbsp;<br /></span></code></div></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[GetKeysCount]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=48846</link>
			<pubDate>Fri, 24 May 2024 20:57:47 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=56138">justforit</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=48846</guid>
			<description><![CDATA[<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #007700">Private&nbsp;Function&nbsp;</span><span style="color: #0000BB">GetKeysCount</span><span style="color: #007700">(</span><span style="color: #0000BB">cn&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">OleDbConnection</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">tb&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">)&nbsp;As&nbsp;</span><span style="color: #0000BB">Integer<br />&nbsp; &nbsp; &nbsp;</span><span style="color: #007700">If&nbsp;</span><span style="color: #0000BB">cn</span><span style="color: #007700">.</span><span style="color: #0000BB">State&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ConnectionState</span><span style="color: #007700">.</span><span style="color: #0000BB">Closed&nbsp;Then&nbsp;cn</span><span style="color: #007700">.</span><span style="color: #0000BB">Open</span><span style="color: #007700">()<br />&nbsp;</span><span style="color: #0000BB"> &nbsp; &nbsp;Dim&nbsp;akeys&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">DataTable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">cn</span><span style="color: #007700">.</span><span style="color: #0000BB">GetOleDbSchemaTable</span><span style="color: #007700">(</span><span style="color: #0000BB">OleDbSchemaGuid</span><span style="color: #007700">.</span><span style="color: #0000BB">Primary_Keys</span><span style="color: #007700">,&nbsp;New&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">()&nbsp;{</span><span style="color: #0000BB">Nothing</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Nothing</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">tb</span><span style="color: #007700">})<br />&nbsp;</span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">Return&nbsp;(</span><span style="color: #0000BB">akeys</span><span style="color: #007700">.</span><span style="color: #0000BB">Rows</span><span style="color: #007700">.</span><span style="color: #0000BB">Count</span><span style="color: #007700">)<br />&nbsp;</span><span style="color: #0000BB">End&nbsp;</span><span style="color: #007700">Function&nbsp;<br /></span></code></div></div></div><br />
<span style="font-size: small;" class="mycode_size">هل اكسس يسمح باكثر من مفتاح ضمن جدول واحد؟</span><br />
<span style="font-size: small;" class="mycode_size">ان كان لا يسمح فهذا الكود مناسب للتحقق قبل الاضافة (لمن ليس عندهم برنامج الاكسس و انما فقط ملفات التشغيل)</span>]]></description>
			<content:encoded><![CDATA[<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #007700">Private&nbsp;Function&nbsp;</span><span style="color: #0000BB">GetKeysCount</span><span style="color: #007700">(</span><span style="color: #0000BB">cn&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">OleDbConnection</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">tb&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">)&nbsp;As&nbsp;</span><span style="color: #0000BB">Integer<br />&nbsp; &nbsp; &nbsp;</span><span style="color: #007700">If&nbsp;</span><span style="color: #0000BB">cn</span><span style="color: #007700">.</span><span style="color: #0000BB">State&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ConnectionState</span><span style="color: #007700">.</span><span style="color: #0000BB">Closed&nbsp;Then&nbsp;cn</span><span style="color: #007700">.</span><span style="color: #0000BB">Open</span><span style="color: #007700">()<br />&nbsp;</span><span style="color: #0000BB"> &nbsp; &nbsp;Dim&nbsp;akeys&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">DataTable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">cn</span><span style="color: #007700">.</span><span style="color: #0000BB">GetOleDbSchemaTable</span><span style="color: #007700">(</span><span style="color: #0000BB">OleDbSchemaGuid</span><span style="color: #007700">.</span><span style="color: #0000BB">Primary_Keys</span><span style="color: #007700">,&nbsp;New&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">()&nbsp;{</span><span style="color: #0000BB">Nothing</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Nothing</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">tb</span><span style="color: #007700">})<br />&nbsp;</span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">Return&nbsp;(</span><span style="color: #0000BB">akeys</span><span style="color: #007700">.</span><span style="color: #0000BB">Rows</span><span style="color: #007700">.</span><span style="color: #0000BB">Count</span><span style="color: #007700">)<br />&nbsp;</span><span style="color: #0000BB">End&nbsp;</span><span style="color: #007700">Function&nbsp;<br /></span></code></div></div></div><br />
<span style="font-size: small;" class="mycode_size">هل اكسس يسمح باكثر من مفتاح ضمن جدول واحد؟</span><br />
<span style="font-size: small;" class="mycode_size">ان كان لا يسمح فهذا الكود مناسب للتحقق قبل الاضافة (لمن ليس عندهم برنامج الاكسس و انما فقط ملفات التشغيل)</span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[الغاء المفتاح من الجدول]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=48731</link>
			<pubDate>Sat, 18 May 2024 15:00:28 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=56138">justforit</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=48731</guid>
			<description><![CDATA[<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">ALTER&nbsp;TABLE&nbsp;YourTableName&nbsp;DROP&nbsp;CONSTRAINT&nbsp;PrimaryKey&nbsp;<br /></span></code></div></div></div><div style="text-align: center;" class="mycode_align"><span style="font-size: small;" class="mycode_size">مع انه بسيط لكن تعبت و انا اخمن بنية الكود عشان هذا اضفته لاتذكره بسهولة</span></div>
<div style="text-align: center;" class="mycode_align"><span style="font-size: small;" class="mycode_size">مساء الخير.</span></div>]]></description>
			<content:encoded><![CDATA[<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">ALTER&nbsp;TABLE&nbsp;YourTableName&nbsp;DROP&nbsp;CONSTRAINT&nbsp;PrimaryKey&nbsp;<br /></span></code></div></div></div><div style="text-align: center;" class="mycode_align"><span style="font-size: small;" class="mycode_size">مع انه بسيط لكن تعبت و انا اخمن بنية الكود عشان هذا اضفته لاتذكره بسهولة</span></div>
<div style="text-align: center;" class="mycode_align"><span style="font-size: small;" class="mycode_size">مساء الخير.</span></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[موديول لانشاء ملف الاكسل واعادة تسمية الورقة الاولى الى tb بدل كلمة ,ورقة1]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=48257</link>
			<pubDate>Wed, 17 Apr 2024 19:40:05 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=56138">justforit</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=48257</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">كما مكتوب بالعنوان وهذا محتوى الموديول:</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">Imports&nbsp;System</span><span style="color: #007700">.</span><span style="color: #0000BB">Runtime</span><span style="color: #007700">.</span><span style="color: #0000BB">InteropServices<br />Imports&nbsp;Microsoft</span><span style="color: #007700">.</span><span style="color: #0000BB">Office</span><span style="color: #007700">.</span><span style="color: #0000BB">Interop<br />Module&nbsp;Module1<br />&nbsp; &nbsp; Dim&nbsp;sw&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Integer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Screen</span><span style="color: #007700">.</span><span style="color: #0000BB">PrimaryScreen</span><span style="color: #007700">.</span><span style="color: #0000BB">WorkingArea</span><span style="color: #007700">.</span><span style="color: #0000BB">Right<br />&nbsp; &nbsp; Dim&nbsp;sh&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Integer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Screen</span><span style="color: #007700">.</span><span style="color: #0000BB">PrimaryScreen</span><span style="color: #007700">.</span><span style="color: #0000BB">WorkingArea</span><span style="color: #007700">.</span><span style="color: #0000BB">Bottom<br />&nbsp; &nbsp; Dim&nbsp;ax</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ay&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Integer</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">dr&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Boolean<br />&nbsp; &nbsp; Public&nbsp;myform&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Form&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Nothing<br />&nbsp; &nbsp; Public&nbsp;apppath&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">String&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">IO</span><span style="color: #007700">.</span><span style="color: #0000BB">Path</span><span style="color: #007700">.</span><span style="color: #0000BB">GetDirectoryName</span><span style="color: #007700">(</span><span style="color: #0000BB">System</span><span style="color: #007700">.</span><span style="color: #0000BB">Windows</span><span style="color: #007700">.</span><span style="color: #0000BB">Forms</span><span style="color: #007700">.</span><span style="color: #0000BB">Application</span><span style="color: #007700">.</span><span style="color: #0000BB">ExecutablePath</span><span style="color: #007700">)&nbsp;&amp;&nbsp;</span><span style="color: #DD0000">"&#092;"<br />&nbsp; &nbsp; Public&nbsp;xdb&nbsp;As&nbsp;String&nbsp;=&nbsp;apppath&nbsp;&amp;&nbsp;"</span><span style="color: #0000BB">db</span><span style="color: #007700">.</span><span style="color: #0000BB">xlsx</span><span style="color: #DD0000">"<br />&nbsp; &nbsp; Public&nbsp;excelapp&nbsp;As&nbsp;Excel.Application<br />&nbsp; &nbsp; Public&nbsp;excelworkbook&nbsp;As&nbsp;Excel.Workbook<br />&nbsp; &nbsp; Public&nbsp;excelworksheet&nbsp;As&nbsp;Excel.Worksheet<br />&nbsp; &nbsp; Public&nbsp;misv&nbsp;As&nbsp;Object&nbsp;=&nbsp;Reflection.Missing.Value<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;xc()<br />&nbsp; &nbsp; &nbsp; &nbsp; excelworkbook.Close()<br />&nbsp; &nbsp; &nbsp; &nbsp; excelapp.Quit()<br />&nbsp; &nbsp; &nbsp; &nbsp; releaseObject(excelapp)<br />&nbsp; &nbsp; &nbsp; &nbsp; releaseObject(excelworkbook)<br />&nbsp; &nbsp; &nbsp; &nbsp; releaseObject(excelworksheet)<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;CreateExcelFile()<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;IO.File.Exists(xdb)&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgBox("</span><span style="color: #0000BB">الملف&nbsp;موجود&nbsp;مسبقا</span><span style="color: #DD0000">",&nbsp;MsgBoxStyle.Information,&nbsp;"")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit&nbsp;Sub<br />&nbsp; &nbsp; &nbsp; &nbsp; Else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excelapp&nbsp;=&nbsp;New&nbsp;Excel.Application<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excelworkbook&nbsp;=&nbsp;excelapp.Workbooks.Add(misv)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excelworksheet&nbsp;=&nbsp;CType(excelworkbook.Worksheets(1),&nbsp;Excel.Worksheet)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excelworksheet.Name&nbsp;=&nbsp;"</span><span style="color: #0000BB">tb1</span><span style="color: #DD0000">"<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excelworkbook.SaveAs(xdb)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xc()<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;releaseObject(ByVal&nbsp;obj&nbsp;As&nbsp;Object)<br />&nbsp; &nbsp; &nbsp; &nbsp; Try<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj&nbsp;=&nbsp;Nothing<br />&nbsp; &nbsp; &nbsp; &nbsp; Catch&nbsp;ex&nbsp;As&nbsp;Exception<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj&nbsp;=&nbsp;Nothing<br />&nbsp; &nbsp; &nbsp; &nbsp; Finally<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GC.Collect()<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;Try<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;rep(f&nbsp;As&nbsp;Form)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;f.Left&nbsp;&lt;&nbsp;0&nbsp;Then&nbsp;f.Left&nbsp;=&nbsp;0<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;f.Top&nbsp;&lt;&nbsp;0&nbsp;Then&nbsp;f.Top&nbsp;=&nbsp;0<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;f.Right&nbsp;&gt;&nbsp;sw&nbsp;Then&nbsp;f.Left&nbsp;=&nbsp;(sw&nbsp;-&nbsp;f.Width)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;f.Bottom&nbsp;&gt;&nbsp;sh&nbsp;Then&nbsp;f.Top&nbsp;=&nbsp;(sh&nbsp;-&nbsp;f.Height)<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;mdown(sender&nbsp;As&nbsp;Object,&nbsp;e&nbsp;As&nbsp;MouseEventArgs)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;e.Button&nbsp;=&nbsp;MouseButtons.Left&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dr&nbsp;=&nbsp;True<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ax&nbsp;=&nbsp;sender.MousePosition.X&nbsp;-&nbsp;myform.Left<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ay&nbsp;=&nbsp;sender.MousePosition.Y&nbsp;-&nbsp;myform.Top<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;TypeOf&nbsp;sender&nbsp;Is&nbsp;Button&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CType(sender,&nbsp;Button).ForeColor&nbsp;=&nbsp;Color.Red<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;mmove(sender&nbsp;As&nbsp;Object,&nbsp;e&nbsp;As&nbsp;MouseEventArgs)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;dr&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myform.Left&nbsp;=&nbsp;sender.MousePosition.X&nbsp;-&nbsp;ax<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myform.Top&nbsp;=&nbsp;sender.MousePosition.Y&nbsp;-&nbsp;ay<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;mup(sender&nbsp;As&nbsp;Object,&nbsp;e&nbsp;As&nbsp;MouseEventArgs)<br />&nbsp; &nbsp; &nbsp; &nbsp; dr&nbsp;=&nbsp;False<br />&nbsp; &nbsp; &nbsp; &nbsp; rep(myform)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;TypeOf&nbsp;sender&nbsp;Is&nbsp;Button&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CType(sender,&nbsp;Button).ForeColor&nbsp;=&nbsp;Color.Black<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;mcontrols(f&nbsp;As&nbsp;Control)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;TypeOf&nbsp;f&nbsp;Is&nbsp;Form&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;f.MouseDown,&nbsp;AddressOf&nbsp;mdown<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;f.MouseMove,&nbsp;AddressOf&nbsp;mmove<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;f.MouseUp,&nbsp;AddressOf&nbsp;mup<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; &nbsp; &nbsp; For&nbsp;Each&nbsp;c&nbsp;As&nbsp;Control&nbsp;In&nbsp;f.Controls<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mcontrols(c)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;TypeOf&nbsp;(c)&nbsp;Is&nbsp;Panel&nbsp;Or&nbsp;TypeOf&nbsp;(c)&nbsp;Is&nbsp;Label&nbsp;Or&nbsp;TypeOf&nbsp;(c)&nbsp;Is&nbsp;PictureBox&nbsp;Or&nbsp;TypeOf&nbsp;(c)&nbsp;Is&nbsp;GroupBox&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;c.MouseDown,&nbsp;AddressOf&nbsp;mdown<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;c.MouseMove,&nbsp;AddressOf&nbsp;mmove<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;c.MouseUp,&nbsp;AddressOf&nbsp;mup<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; &nbsp; &nbsp; Next<br />&nbsp; &nbsp; End&nbsp;Sub<br />End&nbsp;Module&nbsp;<br /></span></code></div></div></div><span style="font-size: small;" class="mycode_size">وباي حدث تريد التنفيذ اكتب الكود التالي:</span><br />
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #007700">If&nbsp;</span><span style="color: #0000BB">IO</span><span style="color: #007700">.</span><span style="color: #0000BB">File</span><span style="color: #007700">.</span><span style="color: #0000BB">Exists</span><span style="color: #007700">(</span><span style="color: #0000BB">xdb</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">False&nbsp;Then<br />&nbsp; &nbsp; &nbsp;CreateExcelFile</span><span style="color: #007700">()<br />&nbsp;</span><span style="color: #0000BB">End&nbsp;</span><span style="color: #007700">If&nbsp;<br /></span></code></div></div></div><br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/zip.gif" title="ZIP File" border="0" alt=".zip" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=29503" target="_blank" title="">Module1.zip</a> (الحجم : 1.16 ك ب / التحميلات : 60)
]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">كما مكتوب بالعنوان وهذا محتوى الموديول:</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">Imports&nbsp;System</span><span style="color: #007700">.</span><span style="color: #0000BB">Runtime</span><span style="color: #007700">.</span><span style="color: #0000BB">InteropServices<br />Imports&nbsp;Microsoft</span><span style="color: #007700">.</span><span style="color: #0000BB">Office</span><span style="color: #007700">.</span><span style="color: #0000BB">Interop<br />Module&nbsp;Module1<br />&nbsp; &nbsp; Dim&nbsp;sw&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Integer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Screen</span><span style="color: #007700">.</span><span style="color: #0000BB">PrimaryScreen</span><span style="color: #007700">.</span><span style="color: #0000BB">WorkingArea</span><span style="color: #007700">.</span><span style="color: #0000BB">Right<br />&nbsp; &nbsp; Dim&nbsp;sh&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Integer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Screen</span><span style="color: #007700">.</span><span style="color: #0000BB">PrimaryScreen</span><span style="color: #007700">.</span><span style="color: #0000BB">WorkingArea</span><span style="color: #007700">.</span><span style="color: #0000BB">Bottom<br />&nbsp; &nbsp; Dim&nbsp;ax</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ay&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Integer</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">dr&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Boolean<br />&nbsp; &nbsp; Public&nbsp;myform&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Form&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Nothing<br />&nbsp; &nbsp; Public&nbsp;apppath&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">String&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">IO</span><span style="color: #007700">.</span><span style="color: #0000BB">Path</span><span style="color: #007700">.</span><span style="color: #0000BB">GetDirectoryName</span><span style="color: #007700">(</span><span style="color: #0000BB">System</span><span style="color: #007700">.</span><span style="color: #0000BB">Windows</span><span style="color: #007700">.</span><span style="color: #0000BB">Forms</span><span style="color: #007700">.</span><span style="color: #0000BB">Application</span><span style="color: #007700">.</span><span style="color: #0000BB">ExecutablePath</span><span style="color: #007700">)&nbsp;&amp;&nbsp;</span><span style="color: #DD0000">"&#092;"<br />&nbsp; &nbsp; Public&nbsp;xdb&nbsp;As&nbsp;String&nbsp;=&nbsp;apppath&nbsp;&amp;&nbsp;"</span><span style="color: #0000BB">db</span><span style="color: #007700">.</span><span style="color: #0000BB">xlsx</span><span style="color: #DD0000">"<br />&nbsp; &nbsp; Public&nbsp;excelapp&nbsp;As&nbsp;Excel.Application<br />&nbsp; &nbsp; Public&nbsp;excelworkbook&nbsp;As&nbsp;Excel.Workbook<br />&nbsp; &nbsp; Public&nbsp;excelworksheet&nbsp;As&nbsp;Excel.Worksheet<br />&nbsp; &nbsp; Public&nbsp;misv&nbsp;As&nbsp;Object&nbsp;=&nbsp;Reflection.Missing.Value<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;xc()<br />&nbsp; &nbsp; &nbsp; &nbsp; excelworkbook.Close()<br />&nbsp; &nbsp; &nbsp; &nbsp; excelapp.Quit()<br />&nbsp; &nbsp; &nbsp; &nbsp; releaseObject(excelapp)<br />&nbsp; &nbsp; &nbsp; &nbsp; releaseObject(excelworkbook)<br />&nbsp; &nbsp; &nbsp; &nbsp; releaseObject(excelworksheet)<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;CreateExcelFile()<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;IO.File.Exists(xdb)&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgBox("</span><span style="color: #0000BB">الملف&nbsp;موجود&nbsp;مسبقا</span><span style="color: #DD0000">",&nbsp;MsgBoxStyle.Information,&nbsp;"")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit&nbsp;Sub<br />&nbsp; &nbsp; &nbsp; &nbsp; Else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excelapp&nbsp;=&nbsp;New&nbsp;Excel.Application<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excelworkbook&nbsp;=&nbsp;excelapp.Workbooks.Add(misv)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excelworksheet&nbsp;=&nbsp;CType(excelworkbook.Worksheets(1),&nbsp;Excel.Worksheet)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excelworksheet.Name&nbsp;=&nbsp;"</span><span style="color: #0000BB">tb1</span><span style="color: #DD0000">"<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; excelworkbook.SaveAs(xdb)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xc()<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;releaseObject(ByVal&nbsp;obj&nbsp;As&nbsp;Object)<br />&nbsp; &nbsp; &nbsp; &nbsp; Try<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj&nbsp;=&nbsp;Nothing<br />&nbsp; &nbsp; &nbsp; &nbsp; Catch&nbsp;ex&nbsp;As&nbsp;Exception<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj&nbsp;=&nbsp;Nothing<br />&nbsp; &nbsp; &nbsp; &nbsp; Finally<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GC.Collect()<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;Try<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;rep(f&nbsp;As&nbsp;Form)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;f.Left&nbsp;&lt;&nbsp;0&nbsp;Then&nbsp;f.Left&nbsp;=&nbsp;0<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;f.Top&nbsp;&lt;&nbsp;0&nbsp;Then&nbsp;f.Top&nbsp;=&nbsp;0<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;f.Right&nbsp;&gt;&nbsp;sw&nbsp;Then&nbsp;f.Left&nbsp;=&nbsp;(sw&nbsp;-&nbsp;f.Width)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;f.Bottom&nbsp;&gt;&nbsp;sh&nbsp;Then&nbsp;f.Top&nbsp;=&nbsp;(sh&nbsp;-&nbsp;f.Height)<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;mdown(sender&nbsp;As&nbsp;Object,&nbsp;e&nbsp;As&nbsp;MouseEventArgs)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;e.Button&nbsp;=&nbsp;MouseButtons.Left&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dr&nbsp;=&nbsp;True<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ax&nbsp;=&nbsp;sender.MousePosition.X&nbsp;-&nbsp;myform.Left<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ay&nbsp;=&nbsp;sender.MousePosition.Y&nbsp;-&nbsp;myform.Top<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;TypeOf&nbsp;sender&nbsp;Is&nbsp;Button&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CType(sender,&nbsp;Button).ForeColor&nbsp;=&nbsp;Color.Red<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;mmove(sender&nbsp;As&nbsp;Object,&nbsp;e&nbsp;As&nbsp;MouseEventArgs)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;dr&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myform.Left&nbsp;=&nbsp;sender.MousePosition.X&nbsp;-&nbsp;ax<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myform.Top&nbsp;=&nbsp;sender.MousePosition.Y&nbsp;-&nbsp;ay<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;mup(sender&nbsp;As&nbsp;Object,&nbsp;e&nbsp;As&nbsp;MouseEventArgs)<br />&nbsp; &nbsp; &nbsp; &nbsp; dr&nbsp;=&nbsp;False<br />&nbsp; &nbsp; &nbsp; &nbsp; rep(myform)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;TypeOf&nbsp;sender&nbsp;Is&nbsp;Button&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CType(sender,&nbsp;Button).ForeColor&nbsp;=&nbsp;Color.Black<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; End&nbsp;Sub<br />&nbsp; &nbsp; Public&nbsp;Sub&nbsp;mcontrols(f&nbsp;As&nbsp;Control)<br />&nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;TypeOf&nbsp;f&nbsp;Is&nbsp;Form&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;f.MouseDown,&nbsp;AddressOf&nbsp;mdown<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;f.MouseMove,&nbsp;AddressOf&nbsp;mmove<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;f.MouseUp,&nbsp;AddressOf&nbsp;mup<br />&nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; &nbsp; &nbsp; For&nbsp;Each&nbsp;c&nbsp;As&nbsp;Control&nbsp;In&nbsp;f.Controls<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mcontrols(c)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If&nbsp;TypeOf&nbsp;(c)&nbsp;Is&nbsp;Panel&nbsp;Or&nbsp;TypeOf&nbsp;(c)&nbsp;Is&nbsp;Label&nbsp;Or&nbsp;TypeOf&nbsp;(c)&nbsp;Is&nbsp;PictureBox&nbsp;Or&nbsp;TypeOf&nbsp;(c)&nbsp;Is&nbsp;GroupBox&nbsp;Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;c.MouseDown,&nbsp;AddressOf&nbsp;mdown<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;c.MouseMove,&nbsp;AddressOf&nbsp;mmove<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AddHandler&nbsp;c.MouseUp,&nbsp;AddressOf&nbsp;mup<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End&nbsp;If<br />&nbsp; &nbsp; &nbsp; &nbsp; Next<br />&nbsp; &nbsp; End&nbsp;Sub<br />End&nbsp;Module&nbsp;<br /></span></code></div></div></div><span style="font-size: small;" class="mycode_size">وباي حدث تريد التنفيذ اكتب الكود التالي:</span><br />
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #007700">If&nbsp;</span><span style="color: #0000BB">IO</span><span style="color: #007700">.</span><span style="color: #0000BB">File</span><span style="color: #007700">.</span><span style="color: #0000BB">Exists</span><span style="color: #007700">(</span><span style="color: #0000BB">xdb</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">False&nbsp;Then<br />&nbsp; &nbsp; &nbsp;CreateExcelFile</span><span style="color: #007700">()<br />&nbsp;</span><span style="color: #0000BB">End&nbsp;</span><span style="color: #007700">If&nbsp;<br /></span></code></div></div></div><br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/zip.gif" title="ZIP File" border="0" alt=".zip" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=29503" target="_blank" title="">Module1.zip</a> (الحجم : 1.16 ك ب / التحميلات : 60)
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[كود عرض عدد ملفات بامتدادات محددة]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=48256</link>
			<pubDate>Wed, 17 Apr 2024 02:33:00 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=56138">justforit</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=48256</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم  ورحمة الله وبركاته</div>
<div style="text-align: center;" class="mycode_align">اذكر زمان احتجت كود يجلب او يعرض عدد ملفات بامتدادات محددة ولكوني مبتديء آنذاك<img src="https://vb4arb.com/vb/images/smilies/smile.gif" alt="Smile" title="Smile" class="smilie smilie_1" /> كتبت شبه جريدة من الاكواد اما هذه الايام و بعد انقطاع جزئي عرفت صياغة الـFunction المسؤولة مع ان الحلول حصلت عليها في حينها لكنها كانت بطرق جديدة لم استوعبها.</div>
<div style="text-align: center;" class="mycode_align">المهم هذه او هذا هو الكود:</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #007700">Private&nbsp;Function&nbsp;</span><span style="color: #0000BB">Images_Count</span><span style="color: #007700">(</span><span style="color: #0000BB">Extensions</span><span style="color: #007700">()&nbsp;As&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ImagesFolder&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">)&nbsp;As&nbsp;</span><span style="color: #0000BB">Integer<br />&nbsp; &nbsp; &nbsp;Dim&nbsp;c&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Integer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0<br />&nbsp; &nbsp; &nbsp;</span><span style="color: #007700">For&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Integer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0&nbsp;To&nbsp;Extensions</span><span style="color: #007700">.</span><span style="color: #0000BB">Count&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">Directory</span><span style="color: #007700">.</span><span style="color: #0000BB">GetFiles</span><span style="color: #007700">(</span><span style="color: #0000BB">ImagesFolder</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Extensions</span><span style="color: #007700">(</span><span style="color: #0000BB">i</span><span style="color: #007700">)).</span><span style="color: #0000BB">Length<br />&nbsp; &nbsp; &nbsp;Next<br />&nbsp; &nbsp; &nbsp;</span><span style="color: #007700">Return&nbsp;</span><span style="color: #0000BB">c<br />&nbsp;End&nbsp;</span><span style="color: #007700">Function&nbsp;<br /></span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم  ورحمة الله وبركاته</div>
<div style="text-align: center;" class="mycode_align">اذكر زمان احتجت كود يجلب او يعرض عدد ملفات بامتدادات محددة ولكوني مبتديء آنذاك<img src="https://vb4arb.com/vb/images/smilies/smile.gif" alt="Smile" title="Smile" class="smilie smilie_1" /> كتبت شبه جريدة من الاكواد اما هذه الايام و بعد انقطاع جزئي عرفت صياغة الـFunction المسؤولة مع ان الحلول حصلت عليها في حينها لكنها كانت بطرق جديدة لم استوعبها.</div>
<div style="text-align: center;" class="mycode_align">المهم هذه او هذا هو الكود:</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #007700">Private&nbsp;Function&nbsp;</span><span style="color: #0000BB">Images_Count</span><span style="color: #007700">(</span><span style="color: #0000BB">Extensions</span><span style="color: #007700">()&nbsp;As&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ImagesFolder&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">)&nbsp;As&nbsp;</span><span style="color: #0000BB">Integer<br />&nbsp; &nbsp; &nbsp;Dim&nbsp;c&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Integer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0<br />&nbsp; &nbsp; &nbsp;</span><span style="color: #007700">For&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">As&nbsp;</span><span style="color: #0000BB">Integer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0&nbsp;To&nbsp;Extensions</span><span style="color: #007700">.</span><span style="color: #0000BB">Count&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">Directory</span><span style="color: #007700">.</span><span style="color: #0000BB">GetFiles</span><span style="color: #007700">(</span><span style="color: #0000BB">ImagesFolder</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Extensions</span><span style="color: #007700">(</span><span style="color: #0000BB">i</span><span style="color: #007700">)).</span><span style="color: #0000BB">Length<br />&nbsp; &nbsp; &nbsp;Next<br />&nbsp; &nbsp; &nbsp;</span><span style="color: #007700">Return&nbsp;</span><span style="color: #0000BB">c<br />&nbsp;End&nbsp;</span><span style="color: #007700">Function&nbsp;<br /></span></code></div></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[السلام عليكم]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=48012</link>
			<pubDate>Wed, 06 Mar 2024 20:36:30 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=1657">رشاد حبيب</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=48012</guid>
			<description><![CDATA[السلام عليكم<br />
عندي مشكله في استخدام فيجوال بيسك 2017 عندي قاعدة بيانات SQLite واعمل علي برنامج جرد المخازن مشتريات ومبيعات ومرتجع مورد ومرتجع زبون وعندي هذا الكود بيظهر عدد المشتريات فقط ويتجاهل عدد المبيعات وعدد المرتجعات اريد من الاخواه الافاضل المساعدة في حل هذه المشكله ولكم جزيل الشكر<br />
<br />
هذا الكود يعرض نتيجه  qty فقط <br />
وباقي الحقول لا يتم عرضاها مثل qtya,qtyb,qtyc<br />
المشكله في هذا الجزء <br />
اذا كانت<br />
FROM Invoice WHERE  Qty IS NOT NULL AND ItmName IS NOT NULL AND ItmName &lt;&gt; '' GROUP BY ItmName, code ORDER BY ItmName"<br />
اذا كانت FROM Invoice WHERE  Qty يعرض بيانات Qty<br />
واذا كانت FROM Invoice WHERE  Qtya يعرض بيانات Qtya وهكذا <br />
اريد حل هذه المشكله مع جزيل الشكر<br />
<br />
Imports System.Data.SQLite<br />
<br />
<br />
Public Class ForGARD<br />
<br />
    <br />
    Private Sub ForGARD_Load(sender As Object, e As EventArgs) Handles MyBase.Load<br />
        Using conn As SQLiteConnection = DatabaseConnection.GetConnection()<br />
            conn.Open()<br />
<br />
            Dim query As String = "SELECT ItmName AS أسم_الصنف, code AS كود_الصنف, SUM(Qty) AS مشتريات, SUM(Qtya) AS مبيعات, SUM(Qtyb) AS مرتجع_زبون, SUM(Qtyc) AS مرتجع_مورد, SUM(Qty) - SUM(Qtya) - SUM(Qtyc) + SUM(Qtyb) AS المخزن FROM Invoice WHERE  Qty IS NOT NULL AND ItmName IS NOT NULL AND ItmName &lt;&gt; '' GROUP BY ItmName, code ORDER BY ItmName"<br />
<br />
            Dim dt As New DataTable()<br />
<br />
            Dim adapter As New SQLiteDataAdapter(query, conn)<br />
            adapter.Fill(dt)<br />
<br />
            For Each row As DataRow In dt.Rows<br />
                Dim purchases As Integer = If(row("مشتريات") IsNot DBNull.Value, Convert.ToInt32(row("مشتريات")), 0)<br />
                Dim sales As Integer = If(row("مبيعات") IsNot DBNull.Value, Convert.ToInt32(row("مبيعات")), 0)<br />
                Dim customerReturns As Integer = If(row("مرتجع_زبون") IsNot DBNull.Value, Convert.ToInt32(row("مرتجع_زبون")), 0)<br />
                Dim supplierReturns As Integer = If(row("مرتجع_مورد") IsNot DBNull.Value, Convert.ToInt32(row("مرتجع_مورد")), 0)<br />
<br />
                row("مشتريات") = purchases<br />
                row("مبيعات") = sales<br />
                row("مرتجع_زبون") = customerReturns<br />
                row("مرتجع_مورد") = supplierReturns<br />
                row("المخزن") = purchases - sales - supplierReturns + customerReturns<br />
            Next<br />
<br />
<br />
<br />
            DataGridView1.DataSource = dt<br />
<br />
            Dim columnWidths() As Integer = {200, 90, 90, 90, 90, 90, 90}<br />
<br />
            For i As Integer = 0 To DataGridView1.Columns.Count - 1<br />
                DataGridView1.Columns(i).Width = columnWidths(i)<br />
            Next<br />
<br />
           <br />
        End Using<br />
<hr class="mycode_hr" />
يا جماعة الخير الموقع رافض رفع الملف]]></description>
			<content:encoded><![CDATA[السلام عليكم<br />
عندي مشكله في استخدام فيجوال بيسك 2017 عندي قاعدة بيانات SQLite واعمل علي برنامج جرد المخازن مشتريات ومبيعات ومرتجع مورد ومرتجع زبون وعندي هذا الكود بيظهر عدد المشتريات فقط ويتجاهل عدد المبيعات وعدد المرتجعات اريد من الاخواه الافاضل المساعدة في حل هذه المشكله ولكم جزيل الشكر<br />
<br />
هذا الكود يعرض نتيجه  qty فقط <br />
وباقي الحقول لا يتم عرضاها مثل qtya,qtyb,qtyc<br />
المشكله في هذا الجزء <br />
اذا كانت<br />
FROM Invoice WHERE  Qty IS NOT NULL AND ItmName IS NOT NULL AND ItmName &lt;&gt; '' GROUP BY ItmName, code ORDER BY ItmName"<br />
اذا كانت FROM Invoice WHERE  Qty يعرض بيانات Qty<br />
واذا كانت FROM Invoice WHERE  Qtya يعرض بيانات Qtya وهكذا <br />
اريد حل هذه المشكله مع جزيل الشكر<br />
<br />
Imports System.Data.SQLite<br />
<br />
<br />
Public Class ForGARD<br />
<br />
    <br />
    Private Sub ForGARD_Load(sender As Object, e As EventArgs) Handles MyBase.Load<br />
        Using conn As SQLiteConnection = DatabaseConnection.GetConnection()<br />
            conn.Open()<br />
<br />
            Dim query As String = "SELECT ItmName AS أسم_الصنف, code AS كود_الصنف, SUM(Qty) AS مشتريات, SUM(Qtya) AS مبيعات, SUM(Qtyb) AS مرتجع_زبون, SUM(Qtyc) AS مرتجع_مورد, SUM(Qty) - SUM(Qtya) - SUM(Qtyc) + SUM(Qtyb) AS المخزن FROM Invoice WHERE  Qty IS NOT NULL AND ItmName IS NOT NULL AND ItmName &lt;&gt; '' GROUP BY ItmName, code ORDER BY ItmName"<br />
<br />
            Dim dt As New DataTable()<br />
<br />
            Dim adapter As New SQLiteDataAdapter(query, conn)<br />
            adapter.Fill(dt)<br />
<br />
            For Each row As DataRow In dt.Rows<br />
                Dim purchases As Integer = If(row("مشتريات") IsNot DBNull.Value, Convert.ToInt32(row("مشتريات")), 0)<br />
                Dim sales As Integer = If(row("مبيعات") IsNot DBNull.Value, Convert.ToInt32(row("مبيعات")), 0)<br />
                Dim customerReturns As Integer = If(row("مرتجع_زبون") IsNot DBNull.Value, Convert.ToInt32(row("مرتجع_زبون")), 0)<br />
                Dim supplierReturns As Integer = If(row("مرتجع_مورد") IsNot DBNull.Value, Convert.ToInt32(row("مرتجع_مورد")), 0)<br />
<br />
                row("مشتريات") = purchases<br />
                row("مبيعات") = sales<br />
                row("مرتجع_زبون") = customerReturns<br />
                row("مرتجع_مورد") = supplierReturns<br />
                row("المخزن") = purchases - sales - supplierReturns + customerReturns<br />
            Next<br />
<br />
<br />
<br />
            DataGridView1.DataSource = dt<br />
<br />
            Dim columnWidths() As Integer = {200, 90, 90, 90, 90, 90, 90}<br />
<br />
            For i As Integer = 0 To DataGridView1.Columns.Count - 1<br />
                DataGridView1.Columns(i).Width = columnWidths(i)<br />
            Next<br />
<br />
           <br />
        End Using<br />
<hr class="mycode_hr" />
يا جماعة الخير الموقع رافض رفع الملف]]></content:encoded>
		</item>
	</channel>
</rss>