inkey's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
Members
Active Posts:
49 (0.05 per day)
Joined:
26-June 12
Profile Views:
1,020
Last Active:
User is offline Mar 07 2013 07:25 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   inkey Another day another dollar

Posts I've Made

  1. In Topic: C# Open form instances how to close.

    Posted 4 Jan 2013

    View PostMrShoes, on 04 January 2013 - 02:11 AM, said:

    Are you sure you have references to the correct form when using Close()? Remember, it's not by the class name. So, if you had a Form1 object open, you cannot close it with the code Form1 form1 = new Form1(); form1.Close(); because that creates a new one.

    If you're going to close a form from another, you need the form that's calling the close method to hold reference: Consider either passing the form as a parameter to the new one, or possibly having a static collection of all forms that you can access from anywhere.


    i was thinking it was going to be something to do with how i was creating instances. Have you any links where i can read up on the static collections?
  2. In Topic: C# Open form instances how to close.

    Posted 4 Jan 2013

    View PostAnthonidas, on 04 January 2013 - 01:58 AM, said:

    do you get any errors when using this.Close()? Did you try with this.Hide()?

    No errors just doesn't close the form.

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

inkey hasn't added any friends yet.

Comments

Page 1 of 1
  1. Photo

    samadalove Icon

    20 Jul 2012 - 03:27
    Hello dearest
    My name is Miss Samada
    How are you? I Hope you are fine and in perfect Health.i came across your profile today and deemed it necessary to write you immediately. Am too curious to know you more. Could you please reciprocate to my message by dropping mail on my contact email (Samada4love88@yahoo.com) so we can introduce our self better on media and also share the passion ...
Page 1 of 1