Windows, , System.Windows.Forms.Form.
Windows Application. Console Appliation. . , , , Properties ( , ).
Properties :
Accessibility −
Appearance −
Behavior −
Configurations −
Data −
Design −
Focus −
Layout −
Window style −
Appearance :
BackColor ( );
− BackgroundImage,
− Cursor,
− ForeColor,
− FormBorderStyle,
− Text,
− RightToLeft
Layout :
− Size
, − StartPosition,
− Location (, StartPosition = Manual),
(, ) − WindowState,
− MaxsimumSize,
− MinimumSize,
Window style :
− Icon
−MaximizeBox
− MinimizeBox
.
, (Properties), , (Size) .
, , .
:
Server Explorer ( ),
Solution Explorer ( , , ..),
Dynamic Help ( ),
Toolbox ( )
( !).
, , , .
View.
, (Properties), , . . . , :
|
|
(, , , ),
,
,
,
,
( , ).
, . ! : , ! , .
, , − .
, -, , − .
-, () Toolbox Textbox, Label Button. Text Label A, B, +,= , .
, (Name, Text!) Textbox Button. Textbox , », ѻ, Button Calculate. , , ( !). . . , .
. , (!!!) , , . , ..
, :
private void Calculate_Click(object sender, System.EventArgs e)
{
double a, b;
try/* , , ()*/
{
a=Convert.ToDouble(A.Text);/* (A.Text),
double*/
b=Convert.ToDouble(B.Text);/* (B.Text),
double*/
C.Text=Convert.ToString(a+b);/* (.Text) (a+b) */
}
catch//
{
MessageBox.Show(" !");
}
}
. - - , , ! .
.
:
|
|
private void Form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{// Color
Color clr=Color.FromArgb((int)200,(int)0,(int)0);
Pen p=new Pen(clr);//
Graphics g=CreateGraphics();//
g.DrawRectangle(p,30,180,100,20);//
p=System.Drawing.Pens.Fuchsia;//
g.DrawLine(p,30,254,68,275);//
/*
*/
float R2,r2,k=1,
R=120;//
R2=R*R;
int x,y;
int red=20,gre=250,blu=150;
for(y=0;y<=R;y++)
for(x=0;x<=y;x++)
{
r2=(float)2*x*x;
if(r2>R2) break;
k=1-r2/R2;
clr=Color.FromArgb((int)(k*red),(int)(k*gre),(int)(k*blu));
p=new Pen(clr);
/* */
g.DrawEllipse(p,(float)(210-0.5*x),(float)(200-0.5*x),(float)x,(float)x);
}
}
.
:
1. Properties.
2. Windows?
3. TabIndex ?
4. ?
5. Properties?
6. Properties?
7. , , ?
8. ?
9. , ?
10. , ?
:
1. , , 2 .
2. , , (TextBox).
3. , , Label (TextBox).
4. , , (TextBox).
5. , , (TextBox).
6. , , (TextBox).
7. , , (TextBox).
8. , , (TextBox).
9. , , , , , .
10. , , , (TextBox).
11. , , , (TextBox).
6