请问错误是怎么回事呀?

问题描述

[size=10px]staticvoidMain(){Application.Run(newForm1());}publicpartialclassFormall:Form//D:C#xianshiForm1.cs(103):类、结构或接口成员声明中的标记“class”无效{staticintx=200staticinty=200;staticintcount=0;privatevoidbutton1_Click(objectsender,System.EventArgse){Formallform2=newForm1();form2.FormBorderStyle=FormBorderStyle.Fixed3D;form2.Cursor=Cursors.Hand;form2.SetDesktopLocation(x,y);form2.Visible=true;x+=30;y+=30;this.Activate();this.button1.Enabled=false;}privatevoidForm1_Load(objectsender,System.EventArgse){count+=1;}privatevoidForm1_Closed(objectsender,System.EventArgse){count-=1;}privatevoidForm1_Closing(objectsender,System.ComponentModel.CancelEventArgse){if(MessageBox.Show("确定要关闭窗体吗?","确定",MessageBoxButtons.OKCancel)==DialogResult.Cancel)e.Cancel=true;}privatevoidForm1_Activated(objectsender,System.EventArgse){label1.Text="新窗体的坐标("+x+","+y+")";label2.Text="这是第"+count+"个窗体";}privatevoidbutton2_Click(objectsender,System.EventArgse){this.Hide();}}}

解决方案

解决方案二:
form1在哪里?
解决方案三:
把form1.cs的代码贴上来看看
解决方案四:
usingSystem;usingSystem.Drawing;usingSystem.Collections;usingSystem.ComponentModel;usingSystem.Windows.Forms;usingSystem.Data;namespacexianshi{///<summary>///Form1的摘要说明。///</summary>publicclassForm1:System.Windows.Forms.Form{privateSystem.Windows.Forms.Buttonbutton1;privateSystem.Windows.Forms.Buttonbutton2;///<summary>///必需的设计器变量。///</summary>privateSystem.ComponentModel.Containercomponents=null;publicForm1(){////Windows窗体设计器支持所必需的//InitializeComponent();////TODO:在InitializeComponent调用后添加任何构造函数代码//}///<summary>///清理所有正在使用的资源。///</summary>protectedoverridevoidDispose(booldisposing){if(disposing){if(components!=null){components.Dispose();}}base.Dispose(disposing);}#regionWindows窗体设计器生成的代码///<summary>///设计器支持所需的方法-不要使用代码编辑器修改///此方法的内容。///</summary>privatevoidInitializeComponent(){this.button1=newSystem.Windows.Forms.Button();this.button2=newSystem.Windows.Forms.Button();this.SuspendLayout();////button1//this.button1.Location=newSystem.Drawing.Point(72,112);this.button1.Name="button1";this.button1.TabIndex=0;this.button1.Text="显示新窗体";this.button1.Click+=newSystem.EventHandler(this.button1_Click);////button2//this.button2.Location=newSystem.Drawing.Point(192,112);this.button2.Name="button2";this.button2.TabIndex=1;this.button2.Text="隐藏窗体";this.button2.Click+=newSystem.EventHandler(this.button2_Click);////Form1//this.AutoScaleBaseSize=newSystem.Drawing.Size(6,14);this.ClientSize=newSystem.Drawing.Size(304,198);this.Controls.Add(this.button2);this.Controls.Add(this.button1);this.MaximizeBox=false;this.MinimizeBox=false;this.Name="Form1";this.Text="窗体属性、方法、事件演示";this.Closing+=newSystem.ComponentModel.CancelEventHandler(this.Form1_Closing);this.Load+=newSystem.EventHandler(this.Form1_Load);this.Closed+=newSystem.EventHandler(this.Form1_Closed);this.Activated+=newSystem.EventHandler(this.Form1_Activated);this.ResumeLayout(false);}#endregion///<summary>///应用程序的主入口点。///</summary>[STAThread]staticvoidMain(){Application.Run(newForm1());}这是前面的,麻烦大虾看一下!

时间: 2024-07-30 03:17:54

请问错误是怎么回事呀?的相关文章

接口-com.android.volley.ServerError 这个错误是怎么回事

问题描述 com.android.volley.ServerError 这个错误是怎么回事 如题所示,安卓调用接口,网页访问都是正常,但是在安卓端就报这个错误,求解! 解决方案 您好 ,我也遇到一样的问题,请问您当初是怎么解决的?? 解决方案二: 我应该不是楼上的问题,题主的问题是什么呢? 解决方案三: 你访问得到的对象是jsonobject但是你是用jsarray请求的 解决方案四: 楼主的问题解决了没有,表示也遇到了同样的问题? 解决方案五: 服务器端错误啊,应该是服务器端的问题.跟网页请求

IIS 发布的网站显示:编译错误,怎么回事?

问题描述 请问以下是怎么回事,权限都是有的."/"应用程序中的服务器错误.编译错误说明:在编译向该请求提供服务所需资源的过程中出现错误.请检查下列特定错误详细信息并适当地修改源代码.编译器错误消息:编译器失败,错误代码为255.C:WindowsSysWOW64inetsrv>D:Webmefanswwwrootbinroslyncsc.exe/t:library/utf8output/nostdlib+/R:"C:WindowsMicrosoft.NETFramewo

asp.net-请问网页链接出现这个错误是怎么回事啊?

问题描述 请问网页链接出现这个错误是怎么回事啊? 分析器错误 说明: 在分析向此请求提供服务所需资源时出错.请检查下列特定分析错误详细信息并适当地修改源文件. 分析器错误消息: 未能创建类型"TIS.WebUI.Logics.Test11". 源错误: 行 1: <%@ WebHandler Language="C#" CodeBehind="Test11.ashx.cs" Class="TIS.WebUI.Logics.Test

Win8.1蓝屏提示错误0x00000139怎么回事?

Win8.1蓝屏提示错误0x00000139怎么回事?         具体如下: 1.按Windows和x键,点击命令提示符(管理员); 2.输入DISM.exe /Online /Cleanup-image /checkHealth,按回车; 3.等之前的执行完毕之后,如果有问题,输入DISM.exe /Online /Cleanup-image /RestoreHealth ,按回车. win8.1系统遇到蓝屏错误0x00000139的原因是显卡驱动,如果上面的方法不能解决您的问题,那么您

XP系统提示网站还原错误是怎么回事

  XP系统提示网站还原错误是怎么回事          步骤如下: 1.在开始菜单中,依次展开:所有程序--附件--系统工具--Internet Explorer(无加载项),这样你就可以打开IE了,你也可以右键单价IE的图标,在右键菜单中,选择无加载项启动.但是并不是所有的电脑都有这个选项; 2.在打开的IE中,我们可以看到一个这样的页面,在标签栏下面有一个提示消息:当前正在禁用加载项,右键点击这个提示消息,选择管理加载项,有的浏览器没有提示这个消息,我们用下面的方法打开加载项管理; 3.如

android studio 报错,请问这是怎么回事?怎么解决

问题描述 android studio 报错,请问这是怎么回事?怎么解决 Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.qihoo.sdk.report.b) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by

c-程序在main处就出现段错误是怎么回事啊?求教

问题描述 程序在main处就出现段错误是怎么回事啊?求教 #include #include #include #include typedef char InfoPtr; typedef char VertexType[4]; typedef int VRType; #define INFINITY 100000 #define MAXSIZE 100 typedef int PathMatrix[MAXSIZE][MAXSIZE][MAXSIZE]; typedef int ShortPat

java-maven 哪个大神帮看看在用mvn导项目时出现的这个错误是怎么回事

问题描述 maven 哪个大神帮看看在用mvn导项目时出现的这个错误是怎么回事 Failed to parse plugin descriptor for org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1 (C:Usersliangyab.m2repositoryorgapachemavenpluginsmaven-enforcer-plugin1.0-beta-1maven-enforcer-plugin-1.0-beta-1.

请问这是怎么回事?(有关内存越界)

问题描述 请问这是怎么回事?(有关内存越界) 以下是代码,进入后选择某些功能会出现以下警告: 有没有能帮忙改一下的,谢谢. include include include typedef struct link { char number[100]; char bookname[100]; char author[100]; char publish[100]; char time[100]; float price; char status[100]; struct link *next; }