By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,983 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,983 IT Pros & Developers. It's quick & easy.

Bug ? Files are automatically marked as modified in the IDE with some Windows Forms

P: n/a
Using : VS 2005, .NET 2.0, Windows Form, Win 2k

I have a strange problem in VS : When I open some forms all the files
(resx and cs) of this form are immediately marked as modified (an *
following the file name in the tab of the IDE). So if I open one these form
and immediately close it, VS ask me if I want to save the changes.and that's
quite annoying because in some case I'm not sure if I modified the file or
if it's VS that did it.

After a few research : it happens only with some forms (always the same
forms) - it happens only when the form designer is opened (not when opening
a code file) and in the first second of opening - the Form.Designer.cs files
show that ALL the content of the InitializeComponent() method is rewritten
(a yellow line in the left margin show that).

Does anybody know a solution to that problem, what happens ? Is this a
known bug ?

Thanks !

Steph.
May 16 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
TheSteph wrote:
Using : VS 2005, .NET 2.0, Windows Form, Win 2k

I have a strange problem in VS : When I open some forms all the
files (resx and cs) of this form are immediately marked as modified
(an * following the file name in the tab of the IDE). So if I open
one these form and immediately close it, VS ask me if I want to save
the changes.and that's quite annoying because in some case I'm not
sure if I modified the file or if it's VS that did it.

After a few research : it happens only with some forms (always the
same forms) - it happens only when the form designer is opened (not
when opening a code file) and in the first second of opening - the
Form.Designer.cs files show that ALL the content of the
InitializeComponent() method is rewritten (a yellow line in the left
margin show that).

Does anybody know a solution to that problem, what happens ? Is
this a known bug ?


I've seen this too. It happens due to the fact that the form
re-generates the InitializeComponent method again. If you this: copy
the .cs file, then open the form in the designer, then do a diff, using
your favorite diff tool, between the copy and the live file you'll see
there are changes in the initializecomponent method which are very
tiny, e.g.: some lines are swapped, or a space is introduced here and
there. It only happens with some controls not with all of them. (Tab
control comes to mind)

It's still annoying though. It's also the reason why some usercontrols
dissapear when you build a form. For this a hotfix is made, however
that's not publically available (because, why would we want a fix for a
very annoying problem, eh? )

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
May 17 '06 #2

P: n/a
Thanks for your reply. now I know that's not me !

I also tried to find some differences is the cs files with a file comparing
tool, but I find nothing different.. So I'll wait (and wait and wait.) for
the SP1.

Sometime I've also some forms that opens totally empty in VS.. no more
controls in it and it have it's default size like a new form (but everything
in the cs files is still there.). so once again. I'll wait the SP1.

Steph.
"Frans Bouma [C# MVP]" <pe******************@xs4all.nl> wrote in message
news:xn***************@news.microsoft.com...
TheSteph wrote:
Using : VS 2005, .NET 2.0, Windows Form, Win 2k

I have a strange problem in VS : When I open some forms all the
files (resx and cs) of this form are immediately marked as modified
(an * following the file name in the tab of the IDE). So if I open
one these form and immediately close it, VS ask me if I want to save
the changes.and that's quite annoying because in some case I'm not
sure if I modified the file or if it's VS that did it.

After a few research : it happens only with some forms (always the
same forms) - it happens only when the form designer is opened (not
when opening a code file) and in the first second of opening - the
Form.Designer.cs files show that ALL the content of the
InitializeComponent() method is rewritten (a yellow line in the left
margin show that).

Does anybody know a solution to that problem, what happens ? Is
this a known bug ?


I've seen this too. It happens due to the fact that the form
re-generates the InitializeComponent method again. If you this: copy
the .cs file, then open the form in the designer, then do a diff, using
your favorite diff tool, between the copy and the live file you'll see
there are changes in the initializecomponent method which are very
tiny, e.g.: some lines are swapped, or a space is introduced here and
there. It only happens with some controls not with all of them. (Tab
control comes to mind)

It's still annoying though. It's also the reason why some usercontrols
dissapear when you build a form. For this a hotfix is made, however
that's not publically available (because, why would we want a fix for a
very annoying problem, eh? )

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

May 17 '06 #3

P: n/a
Thanks for your reply. now I know that's not me !

I also tried to find some differences is the cs files with a file comparing
tool, but I find nothing different.. So I'll wait (and wait and wait.) for
the SP1.

Sometime I've also some forms that opens totally empty in VS.. no more
controls in it and it have it's default size like a new form (but everything
in the cs files is still there.). so once again. I'll wait the SP1.

Steph.
"Frans Bouma [C# MVP]" <pe******************@xs4all.nl> wrote in message
news:xn***************@news.microsoft.com...
TheSteph wrote:
Using : VS 2005, .NET 2.0, Windows Form, Win 2k

I have a strange problem in VS : When I open some forms all the
files (resx and cs) of this form are immediately marked as modified
(an * following the file name in the tab of the IDE). So if I open
one these form and immediately close it, VS ask me if I want to save
the changes.and that's quite annoying because in some case I'm not
sure if I modified the file or if it's VS that did it.

After a few research : it happens only with some forms (always the
same forms) - it happens only when the form designer is opened (not
when opening a code file) and in the first second of opening - the
Form.Designer.cs files show that ALL the content of the
InitializeComponent() method is rewritten (a yellow line in the left
margin show that).

Does anybody know a solution to that problem, what happens ? Is
this a known bug ?


I've seen this too. It happens due to the fact that the form
re-generates the InitializeComponent method again. If you this: copy
the .cs file, then open the form in the designer, then do a diff, using
your favorite diff tool, between the copy and the live file you'll see
there are changes in the initializecomponent method which are very
tiny, e.g.: some lines are swapped, or a space is introduced here and
there. It only happens with some controls not with all of them. (Tab
control comes to mind)

It's still annoying though. It's also the reason why some usercontrols
dissapear when you build a form. For this a hotfix is made, however
that's not publically available (because, why would we want a fix for a
very annoying problem, eh? )

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

May 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.