主题:*********求助**********
zwbzzj
[专家分:60] 发布于 2006-10-09 22:40:00
我家安了C#。NET2003,不知道为什么,安好以后随便拖一个控键在工程窗口上,一运行就要我 实时调试 ,还有就是:什么东西都不放,代码也不写,创建好工程就直接运行,又出错,提示是:算术运算中发生溢出或下溢。
请高手帮忙解决。我都弄了一天了还不知道怎么解决。谢谢
回复列表 (共2个回复)
沙发
ren123 [专家分:10] 发布于 2006-10-09 22:43:00
你装的时候是不是没有装完呀?
板凳
cipc [专家分:2280] 发布于 2006-10-10 07:04:00
网上有种解决办法是替换main方法!
1. Start Microsoft Visual Studio .NET.
2. On the File menu, click New, and then click Project.
3. In the New Project dialog box, click either Visual Basic Projects or Visual C# Projects under Project Types, and then click Windows Application under Templates. By default, Form1 is created.
4. Open the .cs or .vb file to see the code for the Form1.Main function.
5. Change the Form1.Main function from
[STAThread] static void Main() { Application.Run(new Form1()); }
to
[DllImport("msvcr70.dll", CallingConvention = CallingConvention.Cdecl)] public static extern int _controlfp(int n, int mask);
[STAThread] static void Main() { const int _EM_OVERFLOW = 0x00000004; const int _MCW_EM = 0x0008001F; _controlfp(_EM_OVERFLOW, _MCW_EM); Application.Run(new Form1()); }
6. Build and run the project.
我来回复