1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Array Of Forms

Discussion in 'C#' started by snehil_khanor, Aug 28, 2010.

  1. snehil_khanor

    snehil_khanor New Member

    Aug 28, 2010
    Likes Received:
    Trophy Points:
    Can any one help me with this problem.. i'ld really appreciate ne help..
    wat i wanna do is.. dat i want to dynamically create objects on a way that they could be created in a loop..
    so i thot an array of object could help
    so i went ahead and wrote this code in a form load event..
    Form1[] formarray = new Form1[4];
    for (int i = 0; i < 4; i++)
    formarray = new Form1();

    but at the line

    I get this exception
    Error creating window handle.
    As u mite have guessed from the code.. wat i wanna do is to open 'n' no. of forms while loading.. and n will differ every time .. actually it will depend upon the no of records in some table and i want the no. of forms to be equal to the no. of records.

Share This Page