اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

قام بنشر

الكود يحتاج الى تهديل ليتوافق مع ما تطلبه

Private Declare Function ActivateKeyboardLayout Lib _
"user32.dll" (ByVal myLanguage As Long, Flag As Boolean) As Long

'define your desired keyboardlanguage
'find your desired language at [URL="http://www.trigeminal.com/frmrpt2dap.asp"][COLOR=#000088]http://www.trigeminal.com/frmrpt2dap.asp[/COLOR][/URL]

Private Const MKD = 1071 'macedonian keyboard language layout
Private Const eng = 1033 'english(united states)keyboard language layout


Private Sub A_Enter()

Call ActivateKeyboardLayout(MKD, 0)

End Sub

Private Sub A_Exit(Cancel As Integer)

Call ActivateKeyboardLayout(eng, 0)

End Sub

 

  • Like 1
قام بنشر

عليكم السلام، تفضل:

 

Private Sub ValidateEnglish()

    Dim I As Long
    Dim txtBuff As String
    Dim CheckChars As String
    CheckChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 "
    
    txtBuff = TextBox1.Text
    For I = 1 To Len(CheckChars)
        txtBuff = Replace$(txtBuff, Mid$(CheckChars, I, 1), "")
    Next I
    
    If txtBuff = "" Then
        'Only characters in CheckChars found
        MsgBox "English."
    Else
        MsgBox "Non-English."
    End If
    
End Sub

Private Sub TextBox1_Change()

    ValidateEnglish
    
End Sub

 

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information