ئۇيغۇرچە يۇنىكودلۇق كىرگۈزگۈچ
ئويغۇرچە ۋە ۋابشقا تىللارنى ئالماشتۇرۇپ ئىشلىتىشكە بولىدۇ
Public imu As Boolean = True
Public Function uyghur(ByVal Hat As String) As String
Dim Kc As Integer = AscW(Hat)
If Kc = 11 Then imu = Not imu
If imu = True Then
Select Case Kc
Case 47 : Kc = 1574
Case 63 : Kc = 1567
Case 44 : Kc = 1548
Case 109,77 : Kc = 1605
Case 110,78 : Kc = 1606
Case 98,66 : Kc = 1576
Case 118,86 : Kc = 1736
Case 99,67 : Kc = 1594
Case 120,88 : Kc = 1588
Case 122,90 : Kc = 1586
Case 97,65 : Kc = 1726
Case 115,83 : Kc = 1587
Case 100 : Kc = 1583
Case 68 : Kc = 1688
Case 102 : Kc = 1575
Case 70 : Kc = 1601
Case 103 : Kc = 1749
Case 71 : Kc = 1711
Case 104 : Kc = 1609
Case 72 : Kc = 1582
Case 106 : Kc = 1602
Case 74 : Kc = 1580
Case 107 : Kc = 1603
Case 75 : Kc = 1734
Case 108,76 : Kc = 1604
Case 59 : Kc = 1563
Case 113,81 : Kc = 1670
Case 119,87 : Kc = 1739
Case 101,69 : Kc = 1744
Case 114,82 : Kc = 1585
Case 116,84 : Kc = 1578
Case 121,89 : Kc = 1610
Case 117,85 : Kc = 1735
Case 105,73 : Kc = 1709
Case 111,79 : Kc = 1608
Case 112,80 : Kc = 1662
Case Else : Kc = 0
End Select
If Kc <> 0 Then
Hat = ChrW(Kc)
End If
End If
uyghur = Hat
End Function
使用:
Private Sub TextBox1_KeyPress(ByVal sender As Object,ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
e.KeyChar = uyghur(e.KeyChar)
End Sub
原文链接:https://www.f2er.com/vb/261499.html