English 中文(简体)
C# WinForm
原标题:C# WinForm nothing happen
  • 时间:2012-05-14 09:25:42
  •  标签:
  • c#
  • winforms

i 在我的视窗服务器2008年建立了C# WinForm,并做了罚款。

但是,在转让这一我的方案时。 排入计算机窗口7,即操作,没有发生。

my code:

[STAThread]
        static void Main()
        {

            try
            {
                Application.SetCompatibleTextRenderingDefault(false);
                DevExpress.UserSkins.BonusSkins.Register();
                Application.EnableVisualStyles();

                //Pour TEST
                //Le_ClientID = "850001";
                //Le_Login = "850001FA";

                using (var loginForm = new Login())
                {
                    if (loginForm.ShowDialog() != System.Windows.Forms.DialogResult.OK)
                        return;
                }

                Application.Run(new Le_MainForm());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

任何人都有想法?

event log show: - System

  • 供应商

    [姓名] 申请

  • 活动1000

    [质量] 页: 1

    2级

    任务100

    关键词 0x8000000000000000000000

  • 时间

    [系统时间] 2012-05-14T09:40:39.000000Z

    EventRecordID 3557

    渠道

    Computer anjouachemineme

    安保

    • EventData

    FrontEnd_Offline.exe 1.0.0.0 4fb0c28b KERNELBASE.dll 6.1.7601.17651 4e2111c0 e0434352 0000d36f f84 01cd31b59ee78b7d C:Soft8_LocalFrontEnd_Offline.exe C:Windowssystem32KERNELBASE.dll dcb7cb01-9da8-11e1-bf8c-1c6f65c1ad74

Thanks you in advance, Stev

PS:作为午餐会,它列入曼格特案,但在大约3次之后消失(技能)。

问题回答

摘录(Start作为署长)

this may happen if you dont have Framew或k Installed in which you created the application by default windows 7 comes with 2.0 and 3.5 Framew或k . if you created application in visual studio 2010 then you need to download FrameW或k 4.0 from Microsoft website to run that exe in Windows 7

you can download Framew或k 4.0 from here

I just encountered this issue in a Windows form App I created. Apparently there is a plethora of issues that can cause this. In my case you could open the Task Manager, click the application, see it open in the task manager, and immediately close. The only way to see what the issue was, was to look at the event viewer and find the error.

第一部分为<>独立性>。 如上所述,确保列入所有所需技能,并确保安装必要的框架。

Second KERNELBASE.dll can become corrupted. To ensure that is not the case you can run the System File checker. Instructions can be found here: http://support.microsoft.com/kb/929833

Third, is my case. I had a method running in the constructor of Program.cs which is the first thing instantiated when you start a windows form app. I had a bug in code that was causing an exception before any exception handling was created. To fix the problem I moved the code to a point after I create an unhandled exception method as such:

AppDomain.CurrentDomain. UnhandledException +=new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

以我的形式施工。 现在,该方案将开始,实际上将出现错误。 然后,我才不得不在我的法典中打上 b子。

我希望,这能够帮助你或其他人去。





相关问题
Bring window to foreground after Mutex fails

I was wondering if someone can tell me what would be the best way to bring my application to the foreground if a mutex was not able to be created for a new instance. E.g.: Application X is running ...

How to start WinForm app minimized to tray?

I ve successfully created an app that minimizes to the tray using a NotifyIcon. When the form is manually closed it is successfully hidden from the desktop, taskbar, and alt-tab. The problem occurs ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

Handle DataTable.DataRow cell change event

I have a DataTable that has several DataColumns and DataRow. Now i would like to handle an event when cell of this DataRow is changed. How to do this in c#?

Apparent Memory Leak in DataGridView

How do you force a DataGridView to release its reference to a bound DataSet? We have a rather large dataset being displayed in a DataGridView and noticed that resources were not being freed after the ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

WPF-XAML window in Winforms Application

I have a Winforms application coded in VS C# 2008 and want to insert a WPF window into the window pane of Winforms application. Could you explain me how this is done.

热门标签