[[Template core/front/global/updateWarning is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]
تنسيق MaskedTextBox1 لكي يظهر بالشكل التالي :
"00/00/0000"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.MaskedTextBox1.Mask = "00/00/0000"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ddd, mmm, yyy As String
ddd = Mid(MaskedTextBox1.Text, 1, 2)
If Len(Trim(ddd)) < 2 Then
ddd = "0" & Trim(ddd)
End If
mmm = Mid(MaskedTextBox1.Text, 4, 2)
If Len(Trim(mmm)) < 2 Then
mmm = "0" & Trim(mmm)
End If
yyy = Mid(MaskedTextBox1.Text, 7, 4)
If Len(Trim(yyy)) < 4 Then
MsgBox("الرجاء ادخال السنة بالتاريخ الصحيح")
Else
Dim rr As Date
rr = CDate(ddd & "/" & mmm & "/" & yyy)
MaskedTextBox1.Text = Format(rr, "dd/MM/yyyy")
End If
تم النشر منذ
السلام عليكم
تنسيق MaskedTextBox1 لكي يظهر بالشكل التالي :
"00/00/0000"
code.txt
شارك هذا الرد
رابط المشاركة
شارك الرد من خلال المواقع ادناه