UIS Application\MainDialog.Designer.cs
-
dear all i am newbe with C#, i got a problem when i am debug, the issue is as following: Error 2 The type 'UIS_Application.MainDialog' already contains a definition for 'toolBtnRun' C:\Documents and Settings\LI ZHIYUAN\Desktop\UIS Application\UIS Application\UIS Application\MainDialog.Designer.cs 555 54 UIS Application how to solve this issu. thanks a lot.
-
dear all i am newbe with C#, i got a problem when i am debug, the issue is as following: Error 2 The type 'UIS_Application.MainDialog' already contains a definition for 'toolBtnRun' C:\Documents and Settings\LI ZHIYUAN\Desktop\UIS Application\UIS Application\UIS Application\MainDialog.Designer.cs 555 54 UIS Application how to solve this issu. thanks a lot.
So you declared toolBtnRun more than once. Use "Find in Files (entire project)" to locate the redundant one(s). :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
So you declared toolBtnRun more than once. Use "Find in Files (entire project)" to locate the redundant one(s). :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
thanks sir, acutally i found already by this way, i couldn't find where i definded more than one. and moreever i couldn't display the "MainDialog GUI", when i double clicked the "maindialog" then the following dialog display and content is : object reference not set to an instances of an object. how to solve it. thanks
-
thanks sir, acutally i found already by this way, i couldn't find where i definded more than one. and moreever i couldn't display the "MainDialog GUI", when i double clicked the "maindialog" then the following dialog display and content is : object reference not set to an instances of an object. how to solve it. thanks
the object reference not set to an instances of an object refers to the fact that you have no instance of MainDialog initialized. Ex:
SomeClass sc;
sc.SomeProperty = "Blah";would yield the same error message => object reference not set to an instances of an object That is because the sc isn't initialized. In fact it's null. It references/points to nothing. Needed
sc = new SomeClass();
before using the reference.I bug
-
thanks sir, acutally i found already by this way, i couldn't find where i definded more than one. and moreever i couldn't display the "MainDialog GUI", when i double clicked the "maindialog" then the following dialog display and content is : object reference not set to an instances of an object. how to solve it. thanks
if you mean double-clicking a form in the solution pane leads to an exception, that must be because some of your code (including the default constructor) gets executed by Visual Designer and a fault of yours results in an Exception. You could always right-click the form, choose "View Code" and go look for the problem. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
the object reference not set to an instances of an object refers to the fact that you have no instance of MainDialog initialized. Ex:
SomeClass sc;
sc.SomeProperty = "Blah";would yield the same error message => object reference not set to an instances of an object That is because the sc isn't initialized. In fact it's null. It references/points to nothing. Needed
sc = new SomeClass();
before using the reference.I bug
thanks sir, i solved already according to your help. here another problem for me, when i set the "maindialog" as topmost, however when i click the mnubutton to display a dialog, it can't be display outside, it displayed the behind the maindialog, if i set the maindialog as normal then it can display, however when i want to run my maindialog, i want it as topmost. how to display the other dialog outside the maindialog when i set maindialog as topmost. thanks a lot
-
thanks sir, i solved already according to your help. here another problem for me, when i set the "maindialog" as topmost, however when i click the mnubutton to display a dialog, it can't be display outside, it displayed the behind the maindialog, if i set the maindialog as normal then it can display, however when i want to run my maindialog, i want it as topmost. how to display the other dialog outside the maindialog when i set maindialog as topmost. thanks a lot