Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I go with Virtlink suggestion on adding the required line in the code, example:</p> <pre><code> public partial class Form1 : Form { public Form1() { InitializeComponent(); this.fileSystemWatcher1.EnableRaisingEvents = false; } } </code></pre> <p>Here is some more reasons I could find out to defend on why you should NOT(NEVER) edit your designer.cs</p> <p>You could find more information from Herenvardo comment <a href="http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/29930c74-e2a9-459e-a38c-aa6a7f61185f/" rel="nofollow">Here</a> . Here is a brief of it..</p> <p>Editing a .Designer.cs (or .Designer.vb in Visual Basic) file is never advisable, no matter why you want to edit it; and it is almost never needed. There are two main reasons why editing those files is so unadvisable:</p> <ol> <li>The IDE writes these files with very rigid coding conventions, and expects them to follow such conventions (stuff like spacing and tabbing won't raise issues, but anything that alters the structure of the file or the parse tree of the code is very likelly to have nasty side effects).</li> <li>The IDE may overwrite your changes under many situations, without even telling you. In general, for a form's or a usercontrol's .designer file, the file is overwritten whenever you make a change from the designer. For settings files (I have not too much practice with these), I guess they are rewritten when you edit the settings from the IDE itself (from the project properties' settings page). The simplest way to be safe is to asume that the IDE may change any .designer file at any time, for any reason. Despite it is well defined when the IDE will write each file, it may be quite hard to know and remember when and why can each file be remade, so better safe than sorry.</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload