Problem Solution Explorer and forms

L

larzeb

I just noticed a very bizarre situation. In Solution Explorer, some of my forms did not display
their forms icon, but rather a class icon. (This particular solution is under VSS control.)

Therefore, I cannot see the form in the forms designer. Most of the forms are inherited from
FormBase, which only contains a status bar with panels.

Most of the forms are locked. I checked-out one form, and immediately its icon changed to the
regular forms icon in Solution Explorer. I then undid the check-in, and the icon remained as the
forms icon. I don't mind this 'work-around', but this technique worked on all the forms except for
one.

Any ideas? TIA
 
K

Kevin Yu [MSFT]

Hi larzeb,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that the inherited form icon in the solution
explorer becomes a class icon instead of a form icon. If there is any
misunderstanding, please feel free to let me know.

Could you let me know how you added the form? Did you add as an Inherited
Form or something else? It will be helpful if you can paste the form class
definition here. Also, does this happen on only one form in the project or
all forms? Will it occur on other machines?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
L

larzeb

Kevin,
Sorry it's taken so long to reply.

Your initial understanding is correct regarding the icon misrepresentation. Most of the forms are
inherited from a base form, which includes a StatusBar with multiple panels.

The problem occurs on all forms.

Larry
 
K

Kevin Yu [MSFT]

Hi Larry,

I also tried to add the Status bar to a form and added several inherited
forms, but all of the icons appear properly after the project is added to
VSS. Could you please check if this also occurs on other machines? If this
is a machine specific issue, I suggest you remove the local copy and get it
from the VSS server again to see if this can resolve the problem.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
K

Kevin Yu [MSFT]

Hi Larry,

Yes I added two panels on it. If you get the whole solution from another
machine, is that issue reproed?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
L

larzeb

Kevin,

I have only one development machine, so I can't try stuff on a second one.

I believe the problem lies in the interaction between Visual Studio and VSS. When I launch VS and
some modules which I know to be forms have a VB icon and not a form icon, I check-out and
undo-check-out, and the proper form icon appears.

As a test, I unbound VSS from this project. This did not change the improper icons during that
session of VS. However, I closed down VS and then relaunched. All icons were correct.

Before I did this, I ran "Analyze and Fix VS DB", which showed no errors. I really hate to lose VSS
functionality, but it's too hard to use VSS with this problem.

Any suggestions?

Thanks
 
L

larzeb

Kevin,

I does affect development! I cannot edit forms - there is no designer available.

Larry
 
K

Kevin Yu [MSFT]

Hi Larry,

Thanks for sending me the project. When I opened the project, the icon for
the .cs file was a class file icon, because the project cannot build due to
lack of come reference dlls. But when I made some modification to it and
made it built, the icon changed to windows form icon. Which works fine. Can
you check if it can be built on your machine?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
L

larzeb

Kevin,

Thanks for looking at the project for me.

First, I also opened the solution. After indicating that it couldn't resolve where the VSS was, and
also indicating that some projects could not be located, I opened Solution Explorer and looked at
Mailhouse project. In a folder called Forms, there are 21 vb modules, all of which are locked. Three
of the 21 have form icons, while the remainder have VB class icons. The 18 VB class icons should be
Forms icons, and therefore I cannot open the designer on them.

I am confused about your mention of a .cs file. All the files should be VB. Also, what modification
did you make which turned the module from a CS to Form module?

Thanks
 
K

Kevin Yu [MSFT]

Hi Larry,

Sorry, my mistake. It has to be .vb file. (So used to csharp projects.) You
cannot get the icon change to winform icon, because the project cannot be
built. Once you add the dependency dlls to the project and make it built
successfully, the icons will be changed to correct ones.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
L

larzeb

Kevin,

The sample I sent you was not complete. I only sent you a single project in a solution which
contains 10 projects. I just wanted you to see the problem.

Of course, I do have the entire solution, and it is complete, with no unresolved dependencies. That
is not the issue,

The computer which runs Visual Studio belongs to a Windows 2003 domain. The source code is stored on
a network share. It runs correctly, except for the icon issue.

I just got a new computer, loaded Windows XP SP2 and fully updated it security wise. I then
installed Visual Studio, Visual SourceSafe and SQL Server. I then loaded all the third-party
software used in the solution (Active Reports, Infragistics, etc.) and did a build. There were no
errors!

However, the icon issue still exists on this new machine. What now?

Larry
 
K

Kevin Yu [MSFT]

Sorry, Larry, I tried but cannot repro this on my machine. When I make this
project build successfully, the icon of this file changed to windows form
icon automatically. And I can open it with the windows form designer.

In this case, I suggest you contact Microsoft PSS for this issue directly.
Their information can be get from the following link:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;OfferProPhone

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top