Page 1 of 2 12 LastLast
Results 1 to 25 of 30

Thread: C#

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47

    C#

    Microsoft Visual Studio C#.
    , . .. / .
    Google :
    Code:
    Form2 NewForm2=new Form2();
    ( , ...)
    , Form2 , .
    - , :
    Code:
    public partial class Form1 : Form
        {
            Form2  NewForm2=new Form2();
            public Form1()
            {
                InitializeComponent();
            }
            ...
        }
    Form2 Form1. -, :
    Code:
    public partial class Form2 : Form
        {
            Form1  NewForm1=new Form1();
            public Form2()
            {
                InitializeComponent();
            }
            ...
        }
    ( - , , ...)


    .. : , Borland Turbo C++ ... ( , ... "" Microsoft , developer-freindly )

  2. #2
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260
    Form2 NewForm2=new Form2();
    .
    , ( , , Projects) , Form2.
    , Click(); .

    ?
    , .

  3. #3
    Registered User 's Avatar
    Join Date: Feb:2006
    Location:
    Posts: 653
    , , .

    Form- ( C#), , . Properties. , delegate event, . +=

  4. #4
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47
    - :
    2 , , - ;
    1 , ;
    Application.Exit(); ( , )

    , Visible true.
    , .

    -

    , ,
    ... delegate event, .
    .

    .. : - bombov

    EDIT : bombov Form1 Form2 , Form2 Form1... :/

    EDIT 2 : Visible .
    textBox Form1.textBox1.Text ,
    Last edited by php_bg; 9th July 2008 at 11:07.

  5. #5
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260
    2 , , - ;
    1 , ;
    Application.Exit(); ( , )
    - , , , .

    , C# :
    {
    new Form2().Show();
    }

  6. #6
    Executor Lan's Avatar
    Join Date: Nov:2005
    Location:
    Posts: 3,304
    Form1 -

    Form2
    public Form MainForm
    {
    get;
    set;
    }

    Form1 :
    Form2 = new Form2();
    Form2.MainForm = this;

    Form2 MainForm.Show(); -
    I mourn thee by dusk | I mourn thee by dawn
    Crave for thy gloss | to seek the silent glades beyond

  7. #7
    Registered User
    Join Date: Sep:2004
    Posts: 127
    - -.
    C# , .

  8. #8
    Supernova Pilot MAD MAX's Avatar
    Join Date: Mar:2003
    Location: . " "
    Posts: 2,265
    - cumo. A o - Windows Forms WPF. , , , .
    Invaders must die!

  9. #9
    Executor Lan's Avatar
    Join Date: Nov:2005
    Location:
    Posts: 3,304
    , , 2 , best practices WPF . , , .
    - WPF - , , .
    I mourn thee by dusk | I mourn thee by dawn
    Crave for thy gloss | to seek the silent glades beyond

  10. #10
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47
    ,

  11. #11
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47
    Lan, , , .

    Code:
    Label1.Text=NewForm.textBox1.Text;
    NewForm .
    :
    'test.Form2.textBox1' is inaccessible due to its protection level
    ,

  12. #12
    Registered User
    Join Date: Sep:2004
    Posts: 127
    Accessibility Levels
    public
    protected
    internal
    protected internal
    private

    Properties.

  13. #13
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47
    OMG

    Properties
    - - -
    Properties
    , ,

  14. #14
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260
    Lan, , , .
    ?

  15. #15
    Registered User
    Join Date: Sep:2004
    Posts: 127
    Quote Originally Posted by bombov View Post
    ?
    - .NET . . (static members )

  16. #16
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47
    ...
    , , - , .

  17. #17
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47
    OK, .
    3 .
    .
    .
    , ( public )
    Form2 :

    Code:
                this.textBox2.Text = edno.textBox1.Text;
                this.textBox3.Text = tri.textBox1.Text;
    edno tri .
    , :

    'System.Windows.Forms.Form' does not contain a definition for 'textBox1' and no extension method 'textBox1' accepting a first argument of type 'System.Windows.Forms.Form' could be found (are you missing a using directive or an assembly reference?)
    , 1 .

  18. #18
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    edno tri System.Windows.Forms.Form, , . , , . , :
    Code:
    this.textBox2.Text = ((MyForm1)edno).textBox1.Text;
    this.textBox3.Text = ((MyForm3)tri).textBox1.Text;
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  19. #19
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47
    , icaci, .

  20. #20
    XaMaB's Avatar
    Join Date: Nov:2001
    Location:
    Posts: 20,387
    , private/protected textBox1 + MyForm1:
    public string TextBoxt1Text
    {
    get
    {
    return textbox1.Text;
    }
    set
    {
    textbox1.Text = value
    }
    }
    get/set , .
    : XaMaB; . 0.42

    In God we Trust (all others must submit a X.509 certificate). , ()

  21. #21
    Registered User 's Avatar
    Join Date: Feb:2006
    Location:
    Posts: 653
    php_bg, . , -.

  22. #22
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47
    , / .
    # ( ), . ... , .
    , , ( )
    , ...
    Attached Files

  23. #23
    Registered User 's Avatar
    Join Date: Feb:2006
    Location:
    Posts: 653
    , . ? .

    .. , .

  24. #24
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47
    ?
    ( ) - .
    -?

  25. #25
    Registered User 's Avatar
    Join Date: Feb:2006
    Location:
    Posts: 653
    Quote Originally Posted by php_bg View Post
    ?
    ( ) - .
    -?
    , . "" ( ). .
    UserControl, , Form .

    , .

    - . :
    - , . -.

    -
    Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |