merhaba arkadaşlar ben 2 text icini kontrol etmek istiyorum program şu şekilde calışıyo formun ustunde bir adet label var ve form ustunde nereye tıklarsan label o noktaya gidiyoo bende bunun uzerine labelin sag mı sola mı aşagıya mı yukarı mı gidiyo ve durdu mu bunları yazı şeklinde yapmak istedim ama bir turlu yapamadım degerleri text te atıp iki texti if else ile eşit mi degil mi sorgulamak istedim ama iki deger de eşit şekilde saydıgı icin sorgulamıyorum program sayıları eşitledigi zaman duruyo label istenildigi yerde de duruyoo bır turlu bunu yazıya dokemedim text yerine label de kullanabılırsınız.
Dim itX As Single
Dim itY As Single
Dim i As Long
Dim p As Long
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
i = Label1.Left
itX = X
itY = Y
p = Label1.Top
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub Timer1_Timer()
If i < itX Then
Label1.Left = Label1.Left + 20
i = i + 20
End If
If i > itX Then
Label1.Left = Label1.Left - 20
i = i - 20
End If
If itX < Label1.Left - 20 Then
Else
If itX > Label1.Left + 20 Then
Else
If p < itY Then
Label1.Top = Label1.Top + 20
p = p + 20
End If
If p > itY Then
Label1.Top = Label1.Top - 20
p = p - 20
End If
End If
End If
If itX > Label1.Left + 20 Then
Else
If itX < Label1.Left - 20 Then
Else
If p < itY Then
Label1.Top = Label1.Top + 20
p = p + 20
End If
If p > itY Then
Label1.Top = Label1.Top - 20
p = p - 20
End If
End If
End If
Label2.Caption = "Label.left= " & Label1.Left
Label3.Caption = "Label.top= " & Label1.Top
Label4.Caption = "itX= " & itX
Label5.Caption = "itY= " & itY
Label6.Caption = "I= " & i
Label7.Caption = "P= " & p
End Sub
__________________
2 text icini nasıl kontrol edebilirim ????
Programlama0 Mesaj
●30 Görüntüleme
- ReadBull.net
- Programlama ve Yazılım
- Programlama
- 2 text icini nasıl kontrol edebilirim ????