منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : تحويل كود
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم
هل ممكن تحويل كود vb6 الى كود vb 2010
Text2.Text = Text1.Text
n = 0
For i = 1 To Len(Text1)
    Text2.SetFocus
    Text2.SelStart = n
    Text2.SelLength = 1
    MsgBox ""
    If Text2.SelText = "a"  Then
        "Text2.SelText = "abc 
        n = n + 6
    ElseIf Text2.SelText = "b" Then
        "Text2.SelText = "bcd 
        n = n + 6
     ElseIf Text2.SelText = "c" Then
        "Text2.SelText = "cd
        n = n + 4
End if
Next
وعليكم السلام ورحمة الله وبركاته

كود :
TextBox2.Text = TextBox1.Text
Dim N As Integer = 0
For i = 1 To Len(TextBox1.Text)
   TextBox2.Focus()
   TextBox2.SelectionLength = n
   TextBox2.SelectionLength = 1
   '  MsgBox("")
   If TextBox2.SelectedText = "a" Then
       TextBox2.SelectedText = "abc"
       N = N + 6
   ElseIf TextBox2.SelectedText = "b" Then
       TextBox2.SelectedText = "bcd"
       N = N + 6
   ElseIf TextBox2.SelectedText = "c" Then
       TextBox2.SelectedText = "cd"
       N = N + 4
   End If
Next
شكرا لك استاذ