تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
تكست بوكس اذا بها جمل اظهر رسالة
#6
العفو
أضف اداتين RadioButton
الاول ارقام والثاني ارقام وحروف

كود :
    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        If Char.IsControl(e.KeyChar) = True Then Exit Sub
        If RadioButton1.Checked = True AndAlso Char.IsDigit(e.KeyChar) = False Then
            MsgBox("ارقام فقط")
            e.Handled = True
        ElseIf RadioButton2.Checked = True AndAlso Char.IsLetterOrDigit(e.KeyChar) = False Then
            MsgBox("ارقام او حروف فقط")
            e.Handled = True
        End If
    End Sub
الْلَّهُم صَلِّ وَسَلِم وَبَارِك عَلَى سَيِّدِنَا مُحَمَّد
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
RE: تكست بوكس اذا بها جمل اظهر رسالة - بواسطة LoveVb - 23-10-16, 01:26 AM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم