Results 1 to 25 of 30
Thread: C#
Hybrid View
-
8th July 2008 22:15 #1
C#
Microsoft Visual Studio C#.
, . .. / .
Google :
( , ...)Code:Form2 NewForm2=new Form2();
, Form2 , .
- , :
Form2 Form1. -, :Code:public partial class Form1 : Form { Form2 NewForm2=new Form2(); public Form1() { InitializeComponent(); } ... }
( - , , ...)Code:public partial class Form2 : Form { Form1 NewForm1=new Form1(); public Form2() { InitializeComponent(); } ... }

.. : , Borland Turbo C++ ...
( , ...
"" Microsoft , developer-freindly
)
-
9th July 2008 01:12 #2.Form2 NewForm2=new Form2();
, ( , , Projects) , Form2.
, Click(); .
?
, .
-
9th July 2008 09:07 #3
, , .
Form- ( C#), , . Properties. , delegate event, . +=
-
9th July 2008 10:48 #4
- :
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.
-
9th July 2008 11:51 #5- , , , .2 , , - ;
1 , ;
Application.Exit(); ( , )
, C# :
{
new Form2().Show();
}
-
9th July 2008 13:32 #6
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
-
9th July 2008 14:34 #7Registered User
Join Date: Sep:2004
Posts: 127
- -.
C# , .
-
9th July 2008 16:15 #8
- cumo. A o - Windows Forms WPF. , , , .
Invaders must die!
-
9th July 2008 18:21 #9
, , 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
-
9th July 2008 12:53 #10
-
9th July 2008 21:26 #11
Lan, , , .
NewForm .Code:Label1.Text=NewForm.textBox1.Text;
:
,'test.Form2.textBox1' is inaccessible due to its protection level
-
9th July 2008 22:09 #12Registered User
Join Date: Sep:2004
Posts: 127
Accessibility Levels
public
protected
internal
protected internal
private
Properties.
-
9th July 2008 22:28 #13
-
9th July 2008 22:34 #14
-
9th July 2008 22:41 #15Registered User
Join Date: Sep:2004
Posts: 127
-
9th July 2008 22:41 #16
-
24th July 2008 21:31 #17
OK, .
3 .
.
.
, ( public
)
Form2 :
edno tri .Code:this.textBox2.Text = edno.textBox1.Text; this.textBox3.Text = tri.textBox1.Text;
, :
, 1 .'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?)
-
24th July 2008 22:41 #18
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
-
24th July 2008 22:57 #19
-
25th July 2008 11:52 #20
, private/protected textBox1 + MyForm1:
get/set , .public string TextBoxt1Text
{
get
{
return textbox1.Text;
}
set
{
textbox1.Text = value
}
}: XaMaB; . 0.42
In God we Trust (all others must submit a X.509 certificate). , ()
-
25th July 2008 13:17 #21
-
25th July 2008 18:59 #22
-
26th July 2008 02:36 #23
-
26th July 2008 11:26 #24
-
26th July 2008 11:44 #25




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in