13-11-19, 04:09 PM
(13-11-19, 03:02 PM)abo3li8555 كتب : الداله هي لي عمل replace هذا هو الكود سؤالي كيف يمكنني تحويل رقم الي حرف علي علي سبيل المثالجزيتم خير تم الحل
اذا كان التكست بوكس يحتوي علي رقم 1234
يظهر كلمه احمد بحيث يكون ان رقم 1 يرمز الي حرف أ ورقم 2 يرمز بحرف ح وهكذا ما هي الفكره او كيف يتم تنفذا شكرا مقدما
كود :
Public Function unloooouck(t As String) As String
Dim flag As Boolean = Operators.CompareString(t, Nothing, False) <> 0
If flag Then
t = t.Replace("+i+1", ".com")
t = t.Replace(",,681", "a")
t = t.Replace(",,451", "b")
t = t.Replace(",,271", "c")
t = t.Replace(",,951", "d")
t = t.Replace(",,931", "e")
t = t.Replace(",,221", "f")
t = t.Replace(",,131", "g")
t = t.Replace(",,831", "h")
t = t.Replace(",,551", "i")
t = t.Replace(",,181", "j")
t = t.Replace(",,471", "k")
t = t.Replace(",,811", "l")
t = t.Replace(",,741", "m")
t = t.Replace(",,791", "n")
t = t.Replace(",,151", "o")
t = t.Replace(",,621", "p")
t = t.Replace(",,441", "q")
t = t.Replace(",,071", "r")
t = t.Replace(",,241", "s")
t = t.Replace(",,031", "t")
t = t.Replace(",,091", "u")
t = t.Replace(",,751", "v")
t = t.Replace(",,201", "w")
t = t.Replace(",,401", "x")
t = t.Replace(",,901", "y")
t = t.Replace(",,101", "z")
t = t.Replace(",-153", "ـ")
t = t.Replace(",-167", "ة")
t = t.Replace(",-186", "آ")
t = t.Replace(",-146", "ء")
t = t.Replace(",-143", "ؤ")
t = t.Replace(",-166", "ئ")
t = t.Replace(",-188", "أ")
t = t.Replace(",-131", "ا")
t = t.Replace(",-171", "ب")
t = t.Replace(",-271", "ت")
t = t.Replace(",-291", "ث")
t = t.Replace(",-231", "ج")
t = t.Replace(",-681", "ح")
t = t.Replace(",-771", "خ")
t = t.Replace(",-331", "د")
t = t.Replace(",-211", "ذ")
t = t.Replace(",-761", "ر")
t = t.Replace(",-871", "ز")
t = t.Replace(",-981", "س")
t = t.Replace(",-891", "ش")
t = t.Replace(",-861", "ص")
t = t.Replace(",-651", "ض")
t = t.Replace(",-541", "ط")
t = t.Replace(",-201", "ظ")
t = t.Replace(",-501", "ع")
t = t.Replace(",-601", "غ")
t = t.Replace(",-801", "ف")
t = t.Replace(",-161", "ق")
t = t.Replace(",-181", "ك")
t = t.Replace(",-341", "ل")
t = t.Replace(",-401", "م")
t = t.Replace(",-901", "ن")
t = t.Replace(",-751", "ه")
t = t.Replace(",-851", "و")
t = t.Replace(",-361", "ي")
End If
Return t
End Function
كود :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = TextBox1.Text.Replace("a", "aa").Replace("b", "bb").Replace("c", "cc")
End Sub