, . , , Windows-. , , Windows-.
// listing 1 (WinSkel)
// Windows-, .
Using System;
Using System.Windows.Forms;
// WinSkel, Form.
class WinSkel: Form
{
Public WinSkel()
{
// .
Text = " () Windows-";
}
// Main .
[STAThread]
Public static void Main()
{
WinSkel skel = new WinSkel(); // .
// .
Application.Run(skel);
}
}
Listing 1 .
, , : System System.Windows.Forms.
System STAThread, Main (), a System.Windows.Forms Windows.Forms.
WinSkel, Form. , WinSkel . () ( , WindowsForms).
WinSkel :
Text = " () Windows-";
Text, . , () Windows-.
Text :
public virtual string Text { get; set; }
Text Control.
Main (), Main (), .
Main() STAThread.
Microsoft , Main () Windows-. STAThread (threading model), , .. , (single-threaded apartment STA).
, , Windows- : .
Main () WinSkel skel. Run (), Application:
Application.Run(skel);
. Application System.Windows. Forms , Windows-.
|
|
Run ():
public static void Run(Form ob)
. WinSkel Form, WinSkel Run ().
, :
(300 300 ).
. , , , . , , , .
: , Windows API, !
Windows , .
, ,
, Form.
,
Application.Run () .
Windows- , , , Visual Studio.