Forms collection


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Forms collection

  1. #1
    Peter Czurak Guest

    Forms collection

    Here is a sniplet of VB6.0 code what would be the equalent in C#.

    For Each frm In Forms
    frm.BackColor = vbRed
    Next


    I want to change background color for each opened form in the application.

    Thanks

    --
    Peter
    pczurak@bigfoot.com



  2. #2
    Russell Jones Guest

    Re: Forms collection

    From the documentation:

    "In Visual Basic 6.0, the Forms collection was a collection whose elements
    represented each loaded form in an application. There is no equivalent for
    the Forms collection in Visual Basic .NET.

    If you need the functionality of the Forms collection, you can create your
    own collection class and add or remove references to forms as the forms are
    loaded or unloaded. For more information, see Walkthrough: Creating Your Own
    Collection Class."
    *************

    "Peter Czurak" <pczurak@bigfoot.com> wrote in message
    news:3d23bce1$1@10.1.10.29...
    Here is a sniplet of VB6.0 code what would be the equalent in C#.

    For Each frm In Forms
    frm.BackColor = vbRed
    Next


    I want to change background color for each opened form in the application.

    Thanks

    --
    Peter
    pczurak@bigfoot.com



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center