Results 1 to 16 of 16

Thread: [RESOLVED] Multiple object movement control array

Threaded View

  1. #1

    Thread Starter
    Fanatic Member Flashbond's Avatar
    Join Date
    Jan 2013
    Location
    Istanbul
    Posts
    646

    Resolved [RESOLVED] Multiple object movement control array

    Hi guys.

    I am trying to make a dock menu with WPF but my question is on VB.NET side. Anyway, basically I want some kind of a control array but I don't know how to write it.

    I have objects in dock are called _1, _2, _3, etc... from left to right. In WPF they are images. On solution explorer they appear as "_1 As Image".
    Mainly, what I need is:

    Code:
    Sub ImgCntrl(i As Integer)
        For Each Image in MainWindow
            With Me("_" & i)
                If object control name < i Then 'If the object is at left hadside of the initial object
                    Move those objects 100 pixel Left
                End If
                If object control name = i Then 'If the object is the initial object
                    Move that object 100 pixel Up
                End If
                If object control name > i Then 'If the object is at right hadside of the initial object
                    Move those objects 100 pixel Right
                End If
             End With
         Next
    End Sub
    
    Private Sub _1_MouseEnter(sender As Object, e As MouseEventArgs) Handles _1.MouseEnter
       ImgCntrl(1)
    End Sub
    
    Private Sub _2_MouseEnter(sender As Object, e As MouseEventArgs) Handles _1.MouseEnter
       ImgCntrl(2)
    End Sub
    
    Private Sub _3_MouseEnter(sender As Object, e As MouseEventArgs) Handles _1.MouseEnter
       ImgCntrl(3)
    End Sub
    Now this will rise the moseovered (there is no MouseHover in WPF thus is MouseEnter) object 100 pixel up while pushing the other objects to left and right. It will bring a dock like menu effect.

    Who may help me for the right expression?

    Thanks a lot!!!
    Last edited by Flashbond; Jun 7th, 2013 at 09:45 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width