Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/08/2008, 12:39
Avatar de GeoAvila
GeoAvila
Colaborador
 
Fecha de Ingreso: diciembre-2003
Ubicación: Antigua Guatemala
Mensajes: 4.032
Antigüedad: 20 años, 4 meses
Puntos: 53
Respuesta: Barra de aplicaciones - windows

por allí encontré este ejemplito, tené en cuenta que hay que agregar todos... los controles que aparecen el código.

Código:
Option Explicit

Private mMoveX          As Long
Private mBlnDirection   As Boolean

Private Sub Form_Load()
    
    With Picture1
        .AutoRedraw = True
        .BackColor = vbYellow
        .Height = 1000
        .Width = 1000
    End With
    
    mMoveX = 0
    Timer1.Interval = 1
    Timer1.Enabled = True
    mBlnDirection = True
End Sub

Private Sub Timer1_Timer()
    DrawLines
    ImageList1.ListImages.Add 1, , Picture1.Image
    Me.Icon = ImageList1.ListImages(1).ExtractIcon
    ImageList1.ListImages.Remove 1
End Sub

Private Sub DrawLines()
    With Picture1
        .Cls
        .DrawWidth = 5
        drawLine mMoveX, vbBlue
        drawLine .Width - mMoveX, vbRed
    
        If mBlnDirection Then
            mMoveX = mMoveX + 30
        Else
            mMoveX = mMoveX - 30
        End If
                
        If mMoveX > .Width - 80 Then mBlnDirection = False
        If mMoveX < 0 Then mBlnDirection = True
    End With
End Sub

Private Sub drawLine(pMoveX As Long, pColor As Long)
    With Picture1
        .CurrentX = .Width / 2: .CurrentY = .Height
        .Line 3, .CurrentX, CurrentY, pMoveX, 0, pColor
    End With
End Sub
saludos
__________________
* Antes de preguntar lee las FAQ, y por favor no hagas preguntas en las FAQ
Sitio http://www.geoavila.com twitter: @GeoAvila