Dim Levo1 As Boolean Dim Desno1 As Boolean Dim Gore1 As Boolean Dim Dole1 As Boolean Dim Levo2 As Boolean Dim Desno2 As Boolean Dim Gore2 As Boolean Dim Dole2 As Boolean Dim x1 As Integer Dim x2 As Integer Dim y1 As Integer Dim y2 As Integer Dim Vreme As Double Dim Razlika As Integer Dim Brzina As Integer Private Sub Form_Activate() klijent.RemoteHost = "neka ip adresa" klijent.RemotePort = "neki port" klijent.Connect End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 38 And igrac.Text = "Igrac1" Then klijent.SendData "gore" ElseIf KeyCode = 37 And igrac.Text = "Igrac1" Then klijent.SendData "levo" ElseIf KeyCode = 39 And igrac.Text = "Igrac1" Then klijent.SendData "desno" ElseIf KeyCode = 40 And igrac.Text = "Igrac1" Then klijent.SendData "dole" ElseIf KeyCode = 32 And igrac.Text = "Igrac1" Then klijent.SendData "pucaj" ElseIf KeyCode = 38 And igrac.Text = "Igrac2" Then klijent.SendData "cgore" ElseIf KeyCode = 37 And igrac.Text = "Igrac2" Then klijent.SendData "clevo" ElseIf KeyCode = 39 And igrac.Text = "Igrac2" Then klijent.SendData "cdesno" ElseIf KeyCode = 40 And igrac.Text = "Igrac2" Then klijent.SendData "cdole" ElseIf KeyCode = 32 And igrac.Text = "Igrac2" Then klijent.SendData "cpucaj" End If If KeyCode = 27 Then Unload Me End If End Sub Private Sub Form_Load() Vreme = Timer x1 = zid(0).Left + zid(o).Width + Shape3.Width x2 = zid(6).Left - Shape2.Width - Shape4.Width y1 = zid(7).Top + zid(7).Height + Shape3.Height y2 = zid(5).Top - Shape2.Height - Shape4.Height Brzina = 1500 End Sub Private Sub klijent_DataArrival(ByVal bytesTotal As Long) Dim podatak As String klijent.GetData podatak If Left(podatak, 5) = "Igrac" Then igrac.Text = podatak End If If podatak = "gore" Then Dole1 = False Levo1 = False Desno1 = False Gore1 = True ElseIf podatak = "levo" Then Desno1 = False Gore1 = False Dole1 = False Levo1 = True ElseIf podatak = "desno" Then Gore1 = False Dole1 = False Levo1 = False Desno1 = True ElseIf podatak = "dole" Then Levo1 = False Desno1 = False Gore1 = False Dole1 = True ElseIf podatak = "cdole" Then Gore2 = False Levo2 = False Desno2 = False Dole2 = True ElseIf podatak = "cdesno" Then Dole2 = False Gore2 = False Levo2 = False Desno2 = True ElseIf podatak = "clevo" Then Gore2 = False Dole2 = False Desno2 = False Levo2 = True ElseIf podatak = "cgore" Then Dole2 = False Levo2 = False Desno2 = False Gore2 = True ElseIf podatak = "pucaj" Then End If End Sub Private Sub Timer1_Timer() Razlika = (Timer - Vreme) * Brzina If Levo1 = True Then Shape3.Left = Shape1.Left - Shape3.Width Shape3.Top = Shape1.Top + (Shape1.Height / 2) tenk(2).Visible = True tenk(0).Visible = False tenk(1).Visible = False tenk(3).Visible = False If Shape1.Left - Shape3.Width <= zid(0).Left + zid(0).Width And Shape1.Top <= zid(0).Top + zid(0).Height And Shape1.Top + Shape1.Height >= zid(0).Top And Shape1.Left + Shape1.Width >= zid(0).Left Or _ Shape1.Left - Shape3.Width <= zid(1).Left + zid(1).Width And Shape1.Top <= zid(1).Top + zid(1).Height And Shape1.Top + Shape1.Height >= zid(1).Top And Shape1.Left + Shape1.Width >= zid(1).Left Or _ Shape1.Left - Shape3.Width <= zid(2).Left + zid(2).Width And Shape1.Top <= zid(2).Top + zid(2).Height And Shape1.Top + Shape1.Height >= zid(2).Top And Shape1.Left + Shape1.Width >= zid(2).Left Or _ Shape1.Left - Shape3.Width <= zid(3).Left + zid(3).Width And Shape1.Top <= zid(3).Top + zid(3).Height And Shape1.Top + Shape1.Height >= zid(3).Top And Shape1.Left + Shape1.Width >= zid(3).Left Or _ Shape1.Left - Shape3.Width <= zid(4).Left + zid(4).Width And Shape1.Top <= zid(4).Top + zid(4).Height And Shape1.Top + Shape1.Height >= zid(4).Top And Shape1.Left + Shape1.Width >= zid(4).Left Or _ Shape1.Left - Shape3.Width <= zid(5).Left + zid(5).Width And Shape1.Top <= zid(5).Top + zid(5).Height And Shape1.Top + Shape1.Height >= zid(5).Top And Shape1.Left + Shape1.Width >= zid(5).Left Or _ Shape1.Left - Shape3.Width <= zid(6).Left + zid(6).Width And Shape1.Top <= zid(6).Top + zid(6).Height And Shape1.Top + Shape1.Height >= zid(6).Top And Shape1.Left + Shape1.Width >= zid(6).Left Or _ Shape1.Left - Shape3.Width <= zid(7).Left + zid(7).Width And Shape1.Top <= zid(7).Top + zid(7).Height And Shape1.Top + Shape1.Height >= zid(7).Top And Shape1.Left + Shape1.Width >= zid(7).Left Or _ Shape1.Left - Shape3.Width <= zid(8).Left + zid(8).Width And Shape1.Top <= zid(8).Top + zid(8).Height And Shape1.Top + Shape1.Height >= zid(8).Top And Shape1.Left + Shape1.Width >= zid(8).Left Or _ Shape1.Left - Shape3.Width <= zid(9).Left + zid(9).Width And Shape1.Top <= zid(9).Top + zid(9).Height And Shape1.Top + Shape1.Height >= zid(9).Top And Shape1.Left + Shape1.Width >= zid(9).Left Then x1 = x1 Else x1 = x1 - Razlika End If End If If Levo2 = True Then Shape4.Left = Shape2.Left - Shape4.Width Shape4.Top = Shape2.Top + (Shape2.Height / 2) topa(2).Visible = True topa(0).Visible = False topa(1).Visible = False topa(3).Visible = False If Shape2.Left - Shape4.Width <= zid(0).Left + zid(0).Width And Shape2.Top <= zid(0).Top + zid(0).Height And Shape2.Top + Shape2.Height >= zid(0).Top And Shape2.Left + Shape2.Width >= zid(0).Left Or _ Shape2.Left - Shape4.Width <= zid(1).Left + zid(1).Width And Shape2.Top <= zid(1).Top + zid(1).Height And Shape2.Top + Shape2.Height >= zid(1).Top And Shape2.Left + Shape2.Width >= zid(1).Left Or _ Shape2.Left - Shape4.Width <= zid(2).Left + zid(2).Width And Shape2.Top <= zid(2).Top + zid(2).Height And Shape2.Top + Shape2.Height >= zid(2).Top And Shape2.Left + Shape2.Width >= zid(2).Left Or _ Shape2.Left - Shape4.Width <= zid(3).Left + zid(3).Width And Shape2.Top <= zid(3).Top + zid(3).Height And Shape2.Top + Shape2.Height >= zid(3).Top And Shape2.Left + Shape2.Width >= zid(3).Left Or _ Shape2.Left - Shape4.Width <= zid(4).Left + zid(4).Width And Shape2.Top <= zid(4).Top + zid(4).Height And Shape2.Top + Shape2.Height >= zid(4).Top And Shape2.Left + Shape2.Width >= zid(4).Left Or _ Shape2.Left - Shape4.Width <= zid(5).Left + zid(5).Width And Shape2.Top <= zid(5).Top + zid(5).Height And Shape2.Top + Shape2.Height >= zid(5).Top And Shape2.Left + Shape2.Width >= zid(5).Left Or _ Shape2.Left - Shape4.Width <= zid(6).Left + zid(6).Width And Shape2.Top <= zid(6).Top + zid(6).Height And Shape2.Top + Shape2.Height >= zid(6).Top And Shape2.Left + Shape2.Width >= zid(6).Left Or _ Shape2.Left - Shape4.Width <= zid(7).Left + zid(7).Width And Shape2.Top <= zid(7).Top + zid(7).Height And Shape2.Top + Shape2.Height >= zid(7).Top And Shape2.Left + Shape2.Width >= zid(7).Left Or _ Shape2.Left - Shape4.Width <= zid(8).Left + zid(8).Width And Shape2.Top <= zid(8).Top + zid(8).Height And Shape2.Top + Shape2.Height >= zid(8).Top And Shape2.Left + Shape2.Width >= zid(8).Left Or _ Shape2.Left - Shape4.Width <= zid(9).Left + zid(9).Width And Shape2.Top <= zid(9).Top + zid(9).Height And Shape2.Top + Shape2.Height >= zid(9).Top And Shape2.Left + Shape2.Width >= zid(9).Left Then x2 = x2 Else x2 = x2 - Razlika End If End If If Desno1 = True Then Shape3.Left = Shape1.Left + Shape1.Width Shape3.Top = Shape1.Top + (Shape1.Height / 2) tenk(3).Visible = True tenk(0).Visible = False tenk(1).Visible = False tenk(2).Visible = False If Shape1.Left + Shape1.Width + Shape3.Width >= zid(0).Left And Shape1.Top + Shape1.Height >= zid(0).Top And Shape1.Top <= zid(0).Top + zid(0).Height And Shape1.Left <= zid(0).Left + zid(0).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(1).Left And Shape1.Top + Shape1.Height >= zid(1).Top And Shape1.Top <= zid(1).Top + zid(1).Height And Shape1.Left <= zid(1).Left + zid(1).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(2).Left And Shape1.Top + Shape1.Height >= zid(2).Top And Shape1.Top <= zid(2).Top + zid(2).Height And Shape1.Left <= zid(2).Left + zid(2).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(3).Left And Shape1.Top + Shape1.Height >= zid(3).Top And Shape1.Top <= zid(3).Top + zid(3).Height And Shape1.Left <= zid(3).Left + zid(3).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(4).Left And Shape1.Top + Shape1.Height >= zid(4).Top And Shape1.Top <= zid(4).Top + zid(4).Height And Shape1.Left <= zid(4).Left + zid(4).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(5).Left And Shape1.Top + Shape1.Height >= zid(5).Top And Shape1.Top <= zid(5).Top + zid(5).Height And Shape1.Left <= zid(5).Left + zid(5).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(6).Left And Shape1.Top + Shape1.Height >= zid(6).Top And Shape1.Top <= zid(6).Top + zid(6).Height And Shape1.Left <= zid(6).Left + zid(6).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(7).Left And Shape1.Top + Shape1.Height >= zid(7).Top And Shape1.Top <= zid(7).Top + zid(7).Height And Shape1.Left <= zid(7).Left + zid(7).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(8).Left And Shape1.Top + Shape1.Height >= zid(8).Top And Shape1.Top <= zid(8).Top + zid(8).Height And Shape1.Left <= zid(8).Left + zid(8).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(9).Left And Shape1.Top + Shape1.Height >= zid(9).Top And Shape1.Top <= zid(9).Top + zid(9).Height And Shape1.Left <= zid(9).Left + zid(9).Width Then x1 = x1 Else x1 = x1 + Razlika End If End If If Desno2 = True Then Shape4.Left = Shape2.Left + Shape2.Width Shape4.Top = Shape2.Top + (Shape2.Height / 2) topa(3).Visible = True topa(0).Visible = False topa(1).Visible = False topa(2).Visible = False If Shape2.Left + Shape2.Width + Shape4.Width >= zid(0).Left And Shape2.Top + Shape2.Height >= zid(0).Top And Shape2.Top <= zid(0).Top + zid(0).Height And Shape2.Left <= zid(0).Left + zid(0).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(1).Left And Shape2.Top + Shape2.Height >= zid(1).Top And Shape2.Top <= zid(1).Top + zid(1).Height And Shape2.Left <= zid(1).Left + zid(1).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(2).Left And Shape2.Top + Shape2.Height >= zid(2).Top And Shape2.Top <= zid(2).Top + zid(2).Height And Shape2.Left <= zid(2).Left + zid(2).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(3).Left And Shape2.Top + Shape2.Height >= zid(3).Top And Shape2.Top <= zid(3).Top + zid(3).Height And Shape2.Left <= zid(3).Left + zid(3).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(4).Left And Shape2.Top + Shape2.Height >= zid(4).Top And Shape2.Top <= zid(4).Top + zid(4).Height And Shape2.Left <= zid(4).Left + zid(4).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(5).Left And Shape2.Top + Shape2.Height >= zid(5).Top And Shape2.Top <= zid(5).Top + zid(5).Height And Shape2.Left <= zid(5).Left + zid(5).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(6).Left And Shape2.Top + Shape2.Height >= zid(6).Top And Shape2.Top <= zid(6).Top + zid(6).Height And Shape2.Left <= zid(6).Left + zid(6).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(7).Left And Shape2.Top + Shape2.Height >= zid(7).Top And Shape2.Top <= zid(7).Top + zid(7).Height And Shape2.Left <= zid(7).Left + zid(7).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(8).Left And Shape2.Top + Shape2.Height >= zid(8).Top And Shape2.Top <= zid(8).Top + zid(8).Height And Shape2.Left <= zid(8).Left + zid(8).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(9).Left And Shape2.Top + Shape2.Height >= zid(9).Top And Shape2.Top <= zid(9).Top + zid(9).Height And Shape2.Left <= zid(9).Left + zid(9).Width Then x2 = x2 Else x2 = x2 + Razlika End If End If If Gore1 = True Then Shape3.Left = Shape1.Left + (Shape1.Width / 2) Shape3.Top = Shape1.Top - Shape3.Height tenk(1).Visible = True tenk(0).Visible = False tenk(2).Visible = False tenk(3).Visible = False If Shape1.Top - Shape3.Height <= zid(0).Top + zid(0).Height And Shape1.Left <= zid(0).Left + zid(0).Width And Shape1.Left + Shape1.Width >= zid(0).Left And Shape1.Top + Shape1.Height >= zid(0).Top Or _ Shape1.Top - Shape3.Height <= zid(1).Top + zid(1).Height And Shape1.Left <= zid(1).Left + zid(1).Width And Shape1.Left + Shape1.Width >= zid(1).Left And Shape1.Top + Shape1.Height >= zid(1).Top Or _ Shape1.Top - Shape3.Height <= zid(2).Top + zid(2).Height And Shape1.Left <= zid(2).Left + zid(2).Width And Shape1.Left + Shape1.Width >= zid(2).Left And Shape1.Top + Shape1.Height >= zid(2).Top Or _ Shape1.Top - Shape3.Height <= zid(3).Top + zid(3).Height And Shape1.Left <= zid(3).Left + zid(3).Width And Shape1.Left + Shape1.Width >= zid(3).Left And Shape1.Top + Shape1.Height >= zid(3).Top Or _ Shape1.Top - Shape3.Height <= zid(4).Top + zid(4).Height And Shape1.Left <= zid(4).Left + zid(4).Width And Shape1.Left + Shape1.Width >= zid(4).Left And Shape1.Top + Shape1.Height >= zid(4).Top Or _ Shape1.Top - Shape3.Height <= zid(5).Top + zid(5).Height And Shape1.Left <= zid(5).Left + zid(5).Width And Shape1.Left + Shape1.Width >= zid(5).Left And Shape1.Top + Shape1.Height >= zid(5).Top Or _ Shape1.Top - Shape3.Height <= zid(6).Top + zid(6).Height And Shape1.Left <= zid(6).Left + zid(6).Width And Shape1.Left + Shape1.Width >= zid(6).Left And Shape1.Top + Shape1.Height >= zid(6).Top Or _ Shape1.Top - Shape3.Height <= zid(7).Top + zid(7).Height And Shape1.Left <= zid(7).Left + zid(7).Width And Shape1.Left + Shape1.Width >= zid(7).Left And Shape1.Top + Shape1.Height >= zid(7).Top Or _ Shape1.Top - Shape3.Height <= zid(8).Top + zid(8).Height And Shape1.Left <= zid(8).Left + zid(8).Width And Shape1.Left + Shape1.Width >= zid(8).Left And Shape1.Top + Shape1.Height >= zid(8).Top Or _ Shape1.Top - Shape3.Height <= zid(9).Top + zid(9).Height And Shape1.Left <= zid(9).Left + zid(9).Width And Shape1.Left + Shape1.Width >= zid(9).Left And Shape1.Top + Shape1.Height >= zid(9).Top Then y1 = y1 Else y1 = y1 - Razlika End If End If If Gore2 = True Then Shape4.Left = Shape2.Left + (Shape2.Width / 2) Shape4.Top = Shape2.Top - Shape4.Height topa(1).Visible = True topa(0).Visible = False topa(2).Visible = False topa(3).Visible = False If Shape2.Top - Shape4.Height <= zid(0).Top + zid(0).Height And Shape2.Left <= zid(0).Left + zid(0).Width And Shape2.Left + Shape2.Width >= zid(0).Left And Shape2.Top + Shape2.Height >= zid(0).Top Or _ Shape2.Top - Shape4.Height <= zid(1).Top + zid(1).Height And Shape2.Left <= zid(1).Left + zid(1).Width And Shape2.Left + Shape2.Width >= zid(1).Left And Shape2.Top + Shape2.Height >= zid(1).Top Or _ Shape2.Top - Shape4.Height <= zid(2).Top + zid(2).Height And Shape2.Left <= zid(2).Left + zid(2).Width And Shape2.Left + Shape2.Width >= zid(2).Left And Shape2.Top + Shape2.Height >= zid(2).Top Or _ Shape2.Top - Shape4.Height <= zid(3).Top + zid(3).Height And Shape2.Left <= zid(3).Left + zid(3).Width And Shape2.Left + Shape2.Width >= zid(3).Left And Shape2.Top + Shape2.Height >= zid(3).Top Or _ Shape2.Top - Shape4.Height <= zid(4).Top + zid(4).Height And Shape2.Left <= zid(4).Left + zid(4).Width And Shape2.Left + Shape2.Width >= zid(4).Left And Shape2.Top + Shape2.Height >= zid(4).Top Or _ Shape2.Top - Shape4.Height <= zid(5).Top + zid(5).Height And Shape2.Left <= zid(5).Left + zid(5).Width And Shape2.Left + Shape2.Width >= zid(5).Left And Shape2.Top + Shape2.Height >= zid(5).Top Or _ Shape2.Top - Shape4.Height <= zid(6).Top + zid(6).Height And Shape2.Left <= zid(6).Left + zid(6).Width And Shape2.Left + Shape2.Width >= zid(6).Left And Shape2.Top + Shape2.Height >= zid(6).Top Or _ Shape2.Top - Shape4.Height <= zid(7).Top + zid(7).Height And Shape2.Left <= zid(7).Left + zid(7).Width And Shape2.Left + Shape2.Width >= zid(7).Left And Shape2.Top + Shape2.Height >= zid(7).Top Or _ Shape2.Top - Shape4.Height <= zid(8).Top + zid(8).Height And Shape2.Left <= zid(8).Left + zid(8).Width And Shape2.Left + Shape2.Width >= zid(8).Left And Shape2.Top + Shape2.Height >= zid(8).Top Or _ Shape2.Top - Shape4.Height <= zid(9).Top + zid(9).Height And Shape2.Left <= zid(9).Left + zid(9).Width And Shape2.Left + Shape2.Width >= zid(9).Left And Shape2.Top + Shape2.Height >= zid(9).Top Then y2 = y2 Else y2 = y2 - Razlika End If End If If Dole1 = True Then Shape3.Left = Shape1.Left + (Shape1.Width / 2) Shape3.Top = Shape1.Top + Shape1.Height tenk(0).Visible = True tenk(2).Visible = False tenk(1).Visible = False tenk(3).Visible = False If Shape1.Top + Shape1.Height + Shape3.Height >= zid(0).Top And Shape1.Left <= zid(0).Left + zid(0).Width And Shape1.Left + Shape1.Width >= zid(0).Left And Shape1.Top <= zid(0).Top + zid(0).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(1).Top And Shape1.Left <= zid(1).Left + zid(1).Width And Shape1.Left + Shape1.Width >= zid(1).Left And Shape1.Top <= zid(1).Top + zid(1).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(2).Top And Shape1.Left <= zid(2).Left + zid(2).Width And Shape1.Left + Shape1.Width >= zid(2).Left And Shape1.Top <= zid(2).Top + zid(2).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(3).Top And Shape1.Left <= zid(3).Left + zid(3).Width And Shape1.Left + Shape1.Width >= zid(3).Left And Shape1.Top <= zid(3).Top + zid(3).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(4).Top And Shape1.Left <= zid(4).Left + zid(4).Width And Shape1.Left + Shape1.Width >= zid(4).Left And Shape1.Top <= zid(4).Top + zid(4).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(5).Top And Shape1.Left <= zid(5).Left + zid(5).Width And Shape1.Left + Shape1.Width >= zid(5).Left And Shape1.Top <= zid(5).Top + zid(5).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(6).Top And Shape1.Left <= zid(6).Left + zid(6).Width And Shape1.Left + Shape1.Width >= zid(6).Left And Shape1.Top <= zid(6).Top + zid(6).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(7).Top And Shape1.Left <= zid(7).Left + zid(7).Width And Shape1.Left + Shape1.Width >= zid(7).Left And Shape1.Top <= zid(7).Top + zid(7).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(8).Top And Shape1.Left <= zid(8).Left + zid(8).Width And Shape1.Left + Shape1.Width >= zid(8).Left And Shape1.Top <= zid(8).Top + zid(8).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(9).Top And Shape1.Left <= zid(9).Left + zid(9).Width And Shape1.Left + Shape1.Width >= zid(9).Left And Shape1.Top <= zid(9).Top + zid(9).Height Then y1 = y1 Else y1 = y1 + Razlika End If End If If Dole2 = True Then Shape4.Left = Shape2.Left + (Shape2.Width / 2) Shape4.Top = Shape2.Top + Shape2.Height topa(0).Visible = True topa(2).Visible = False topa(1).Visible = False topa(3).Visible = False If Shape2.Top + Shape2.Height + Shape4.Height >= zid(0).Top And Shape2.Left <= zid(0).Left + zid(0).Width And Shape2.Left + Shape2.Width >= zid(0).Left And Shape2.Top <= zid(0).Top + zid(0).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(1).Top And Shape2.Left <= zid(1).Left + zid(1).Width And Shape2.Left + Shape2.Width >= zid(1).Left And Shape2.Top <= zid(1).Top + zid(1).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(2).Top And Shape2.Left <= zid(2).Left + zid(2).Width And Shape2.Left + Shape2.Width >= zid(2).Left And Shape2.Top <= zid(2).Top + zid(2).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(3).Top And Shape2.Left <= zid(3).Left + zid(3).Width And Shape2.Left + Shape2.Width >= zid(3).Left And Shape2.Top <= zid(3).Top + zid(3).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(4).Top And Shape2.Left <= zid(4).Left + zid(4).Width And Shape2.Left + Shape2.Width >= zid(4).Left And Shape2.Top <= zid(4).Top + zid(4).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(5).Top And Shape2.Left <= zid(5).Left + zid(5).Width And Shape2.Left + Shape2.Width >= zid(5).Left And Shape2.Top <= zid(5).Top + zid(5).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(6).Top And Shape2.Left <= zid(6).Left + zid(6).Width And Shape2.Left + Shape2.Width >= zid(6).Left And Shape2.Top <= zid(6).Top + zid(6).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(7).Top And Shape2.Left <= zid(7).Left + zid(7).Width And Shape2.Left + Shape2.Width >= zid(7).Left And Shape2.Top <= zid(7).Top + zid(7).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(8).Top And Shape2.Left <= zid(8).Left + zid(8).Width And Shape2.Left + Shape2.Width >= zid(8).Left And Shape2.Top <= zid(8).Top + zid(8).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(9).Top And Shape2.Left <= zid(9).Left + zid(9).Width And Shape2.Left + Shape2.Width >= zid(9).Left And Shape2.Top <= zid(9).Top + zid(9).Height Then y2 = y2 Else y2 = y2 + Razlika End If End If Vreme = Timer Shape1.Left = x1 Shape1.Top = y1 Shape2.Left = x2 Shape2.Top = y2 tenk(0).Top = Shape1.Top tenk(0).Left = Shape1.Left tenk(1).Top = Shape1.Top - Shape3.Height tenk(1).Left = Shape1.Left tenk(2).Top = Shape1.Top tenk(2).Left = Shape1.Left - Shape3.Width tenk(3).Top = Shape1.Top tenk(3).Left = Shape1.Left topa(0).Top = Shape2.Top topa(0).Left = Shape2.Left topa(1).Top = Shape2.Top - Shape4.Height topa(1).Left = Shape2.Left topa(2).Top = Shape2.Top topa(2).Left = Shape2.Left - Shape4.Width topa(3).Top = Shape2.Top topa(3).Left = Shape2.Left End Sub