Oppure

Loading
Questo topic e' stato chiuso dal moderatore.
08/11/09 15:20
ferruccio94
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim randX As New Random
        Dim randY As New Random

        Dim PosX As Integer
        Dim PosY As Integer

        PosX = randX.Next(5, 295)
        PosY = randY.Next(5, 295)

        X.Location = New System.Drawing.Point(PosX, PosY)
    End Sub


In pratica, ogni 10 secondi il label si sposta, ma rimane sempre nella stessa diagonale:

Come posso risolvere?
Ultima modifica effettuata da ferruccio94 08/11/09 15:48
aaa
08/11/09 15:44
ferruccio94
Scusate il disturbo, ho risolto mettendo un solo random :yup: .
aaa