Results 1 to 2 of 2

Thread: looking for a determinated panel in form - RESOLVED

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Location
    Porto Alegre, RS
    Posts
    210

    looking for a determinated panel in form - RESOLVED

    I have 28 panels on my form, and i want to dinamicaly change backcolors, im tring a for like this:

    VB Code:
    1. For Each frm In Forms
    2.         Unload frm
    3.         Set frm = Nothing
    4. Next

    i use this in vb6.

    How can i do this code to look for a panel on my form?


    Thank you,
    Guilherme Costa
    Last edited by gccosta; May 21st, 2004 at 01:13 PM.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. Dim c As Control
    2.  
    3. For Each c In Me.Controls
    4.     If TypeOf c Is Panel Then
    5.         Dim pnl As Panel = DirectCast(c,Panel)
    6.         'Do whatever it is you are doing to pnl
    7.     End If
    8. Next
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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