Thread: accessibilty between 2 forms

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    173

    accessibilty between 2 forms

    Hi:
    If I created two forms in 1 solution, and I insert 1 button in Form1, how could I access this button in Form2?

    Thanx
    Don't laugh at me,I am just a SuperNewbie.

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    You need a variable ( perhaps by using a property ) that holds the button or better yet the whole first form. You can then access the button through this variable.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    173
    yea,I got it, thanx
    Don't laugh at me,I am just a SuperNewbie.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Good introduction to Windows Forms?
    By jcafaro10 in forum C# Programming
    Replies: 1
    Last Post: 05-19-2009, 06:11 PM
  2. Replies: 2
    Last Post: 04-02-2009, 04:40 AM
  3. C# Game using Forms
    By ejohns85 in forum C# Programming
    Replies: 1
    Last Post: 12-16-2006, 05:35 PM
  4. Windows Forms and/or MFC [But definately not win32!] questions
    By Robert_Sitter in forum Windows Programming
    Replies: 2
    Last Post: 12-03-2005, 09:28 PM
  5. Which one :MFC, Win32, Windows Forms (.Net)?
    By Robert_Sitter in forum Windows Programming
    Replies: 6
    Last Post: 11-17-2005, 06:15 AM