الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

التنقل بين التكست بوكس

مغلق
بدأه مصعب غيلان في 12 مايو 2004 · 3 رد · 747 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

رغم ان هذا الموضوع يأتي ردا على سؤال الاخ HnHn الا اني قمت بوضعه في موضوع مستقل لكي يستفيد منه الجميع

ملخص الكود انه يقوم بالتنقل بين التكيستات باستخدام الازرار فوق تحت يمين يسار

ارحب باي اقتراحات على البرنامج

Sample Text.zip

#3

بدلت شيفرتك في الForm بهذه الشيفرة

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
  If Shift = 0 And KeyCode >= 37 And KeyCode <= 40 Then
    ChkMove KeyCode, Text1
  End If
End Sub

Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
  If Shift = 0 And KeyCode >= 37 And KeyCode <= 40 Then
    ChkMove KeyCode, Text2
  End If
End Sub

Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
  If Shift = 0 And KeyCode >= 37 And KeyCode <= 40 Then
    ChkMove KeyCode, Text3
  End If
End Sub

Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
  If Shift = 0 And KeyCode >= 37 And KeyCode <= 40 Then
    ChkMove KeyCode, Text4
  End If
End Sub

Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
  If Shift = 0 And KeyCode >= 37 And KeyCode <= 40 Then
    ChkMove KeyCode, Text5
  End If
End Sub

Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
  If Shift = 0 And KeyCode >= 37 And KeyCode <= 40 Then
    ChkMove KeyCode, Text6
  End If
End Sub
Private Sub ChkMove(KeyCode As Integer, sender As Control)
    Select Case KeyCode
        Case 37
            If sender.TabIndex > 3 Then
                SendKeys "+{tab}+{tab}+{tab}"
            End If
        Case 38
            SendKeys "+{tab}"
        Case 39
            If sender.TabIndex < 4 Then
                SendKeys "{tab}{tab}{tab}"
            End If
        Case 40
            SendKeys "{tab}"
    End Select
    SendKeys "{home}+{end}"
End Sub
#4

اشكرك على هذه الاضافة

اعجبتني فكرة الاجراء ChkMove

وايظا فكرة ارسال المفاتيح SendKey

هذا الموضوع مغلق.

مواضيع مشابهة