using System;
using System.IO;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
public class Form1:Form
{
int W=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;//获取屏幕宽度
int H=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;//获取屏幕高度
public Form1()
{
InitializeComponent();
this.TopMost=true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Size=new Size(100,100);
this.BackColor=Color.BlueViolet;
}
private void InitializeComponent()
{
this.Text="form";
}
static void Main()
{
Application.Run(new Form1());
}
}
请教怎么错了????
求分析
或修改后的源码
【用的是ppc的pocketc#】
错误信息:
>> 开始编译...
\csharp\form\form.exe: no entry point specified
nment
耗时4.126秒
>> 编译失败
--------------------编程问答--------------------
static void Main()不是一般在Program.cs文件中吗。
这个:>> 开始编译...
\csharp\fom\fom.exe: no entry point specified
ignment
\csharp\fom\form1.cs:22: invalid type specification `(null)'
\csharp\fom\form1.cs:22: `int' does not inherit from `System.Attribute'
耗时3.207秒
>> 编译失败
感觉好晕
--------------------编程问答--------------------
除
--------------------编程问答--------------------
//Form1里面
public partial class Form1 : Form
{
int W = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;//获取屏幕宽度
int H = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;//获取屏幕高度
public Form1()
{
InitializeComponent();
this.TopMost = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Size = new Size(100, 100);
this.BackColor = Color.BlueViolet;
}