منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
[كود] مشكله في الكود - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183)
+--- الموضوع : [كود] مشكله في الكود (/showthread.php?tid=45190)



مشكله في الكود - alswade - 29-01-23

Imports System.Globalization

Public Class Form1
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
        Dim gregorianDate As Date = Date.Today
        Label1.Text = "Gregorian Date: " & gregorianDate

        Dim hijriCalendar As New HijriCalendar()
        Dim hijriDate As Integer = hijriCalendar.GetYear(gregorianDate)
        Label2.Text = "Hijri Date: " & hijriCalendar.GetMonth(gregorianDate) & "/" & hijriCalendar.GetDayOfMonth(gregorianDate) & "/" & hijriDate

        Dim copticCalendar As New CopticCalendar()
        Dim copticDate As Integer = copticCalendar.GetYear(gregorianDate)
        Label3.Text = "Coptic Date: " & copticCalendar.GetMonth(gregorianDate) & "/" & copticCalendar.GetDayOfMonth(gregorianDate) & "/" & copticDate
    End Sub
End Class
في مشكله في الكود ده بيظهر هذه الرساله
Error 1 Type 'CopticCalendar' is not defined.


RE: مشكله في الكود - عبد العزيز البسكري - 29-01-23

إذا كانت هذه المسمّاة مكتبة خاصة 

طبعا سيظهر لك خطأ و يجب عليك إضافتها للمشروع



RE: مشكله في الكود - Jounior_P - 30-01-23

التقويم القبطي ليس ضمن مكتبات التقويم المدرجة بالمكتبة المذكورة (راجع التقويمات المعتمدة للمكتبة من هنا : https://learn.microsoft.com/en-us/dotnet/api/system.globalization.calendar?view=net-7.0)

يجب عمل Function يدويا للحصول على التقويم القبطي