I\'m working with Delphi2010 Enterprise Update 4.
When I\'m opening my project in the IDE and displaying the mainform code, there are 2 unit names underline in r
Just disable Error Insight (Tools -> Options -> Editor Options -> Code Insight, uncheck Error Insight). It works fine for me.
Source: http://codeverge.com/embarcadero.delphi.ide/cannot-resolve-unit-name-forms/1041789
This is a cosmetic issue only, and doesn't affect your application in any way.
It's caused by a bug in the compiler used for Error Insight (the functionality that gives you the wavy red lines), which is not the same compiler used to build your application or to compile from the command line. The bug has existed since Error Insight was first introduced. (It has gotten less frequent, though; it used to be that the first thing I would do when I installed Delphi was to disable Error Insight, and I haven't had to do that with either D2007 or D2009 as the problem is very infrequent and do esn't seem to last long for whatever reason.)
Since there really isn't a problem (other than the cosmetic issue), you can either ignore it or get rid of it by disabling Error Insight (Tools -> Options -> Editor Options -> Code Insight, uncheck Error Insight).