用timer控件,设置其left属性可否?

解决方案 »

  1.   

    同意楼上所说!用TIMER控件设置每秒就执行一次,控件的左右(LEFT)和上下(TOP)不断改变!
      

  2.   

    鎵撴壈鑰佸ぇ
    http://expert.csdn.net/Expert/topic/1138/1138210.xml?temp=.2150385鎴戞槸璇达紝榧犳爣绉诲姩鍒?pictur1涓殑commond1璺戦亾picture2鍚庯紝褰撻紶鏍囩Щ鍔ㄥ埌 pictur2涓殑commond1杩樿兘璺戦亾picture1//濡備綍瀹炵幇锛焭[email protected]
      

  3.   

    打扰老大
    http://expert.csdn.net/Expert/topic/1138/1138210.xml?temp=.2150385我是说,鼠标移动到 pictur1中的commond1跑道picture2后,当鼠标移动到 pictur2中的commond1还能跑道picture1//如何实现?[email protected]
      

  4.   

    注意显示申明!Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Static s as Long,t as long
        
        s = Not 1
        t = Not 1
        If t And s Then
            z = SetParent(Command1.hWnd, ByVal Picture2.hWnd)
     
          
        Else        z = SetParent(Command1.hWnd, ByVal Picture1.hWnd)
        End If
      
    End Sub
      

  5.   

    http://expert.csdn.net/Expert/topic/1138/1138210.xml?temp=.512005
    老大,按钮 移动到,picture2后,还是移动不回来。怎么回师/
    在你机子 上 能么?
    我的怎么不能?
    Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Static s As Long, t As Long
        
        s = Not 1
        t = Not 1
        If t And s Then
            z = SetParent(Command1.hWnd, ByVal Picture2.hWnd)
     
          
        Else        z = SetParent(Command1.hWnd, ByVal Picture1.hWnd)
        End If
      
    End Sub谢谢 了 。/[email protected]
      

  6.   

    谁叫你照抄
    我只是写了一个思路
    Private t as BooleanPrivate Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Static s as Boolean
        
        if t=False then Exit Sub
        
        s = Not s
        If s Then
            z = SetParent(Command1.hWnd, ByVal Picture2.hWnd)
        Else
            z = SetParent(Command1.hWnd, ByVal Picture1.hWnd)
        End If
      
    End Sub
      

  7.   

    Option ExplicitPrivate Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    Dim bPos As Boolean, zPrivate Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
       
      If bPos Then
          z = SetParent(Command1.hWnd, ByVal Picture2.hWnd)
      Else
          z = SetParent(Command1.hWnd, ByVal Picture1.hWnd)
      End If
      Command1.Move 200, 200
      bPos = Not bPos
     End Sub