Results 1 to 2 of 2

Thread: [2005] Cycle through controls.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Location
    Alaska
    Posts
    435

    [2005] Cycle through controls.

    I have 80 panels 16x16 that look like this:



    I'm trying to cylce through each panel, so if I put my mouse over the panel on row 1 column 10, it will run:

    pl_?x1.SetMouseOver(True)

    My idea was to do it like this:
    Code:
    For i As Integer = 1 To 10
    pl_?x1.SetMouseOver(True)
    Next
    Where ? = i

    The issue is I can't seem to put i into the name.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2005] Cycle through controls.

    You should be using a TableLayoutPanel with a Panel in each cell. You can then use a nested loop to visit each cell of the TLP and call GetControlFromPosition to get the Panels.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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