I am having a problem thats not about the code, it's about the screen in Microsoft visual studio 2008.
Actually problem is i created one utility from couple of weeks i didn't opened that utility today i opened (in Microsoft visual studio the screen appearing blank no controls are visible in that.But all the controls properties are there. I tried a lot but i didn't get solution. Last when the same thing happened i created the controls again. Now i don't want to go to create all the controls again. If any one have the solution please help me.
Before screen is like this:
Now its blank (like new page)
From your description I'm not sure if this is a application/code build issue or an IDE issue, what you could try is to reset the settings in visual studio and see if this helps.
You can do this by going to Tools -> Import/Export settings and then following the wizard to reset the settings, you may also want to perform a backup before resetting them (this is also part of the wizard) then they can be restored if this causes you further issues.
I don't have a copy of 2008 available at the moment so some menu entries may be slightly named different.
Hope this helps!
EDIT:
Now there is more information, this looks like there may be a problem with the code in the
InitializeComponent
method of the form.designer file (e.g. if you are using c# this would be something like Form1.Designer.cs and can be found by expanding the corresponding form in the solution explorer), if you remove/comment the lines that say
this.Controls.Add(this.NameOfControl)
(NameOfControl is where you would see your declared controls name)
then you get the behaviour that you are seeing, the controls do not render as they are never added to the forms controls collection but as they are declared you will still see them in the properties drop down and wont be able to add another control with the same name.
Related
I have a project in Visual Studio which is misidentifying some of the files as 'user controls' as opposed to code-only classes. The project compiles and runs just fine, but it does leave a slightly annoying issue that when these files are double-clicked, the designer window is presented instead of the code editor.
Obviously, there are plenty of ways to get to the editor but, firstly it's annoying, and secondly, I don't know if this could lead to other issues later down the road so I'd like to resolve the problem sooner rather than later.
As you can see from the screenshot, there are 5 files, all of which are code-only classes, yet 4 of them are identified as custom-controls by the solutions explorer; only the final one is identified correctly.
Background
I am working with VB6 legacy code and I am using an external editor because of the features that it has. Unfortunately, those changes aren't refreshed in the IDE because VB6 doesn't monitor loaded code for changes.
I have done some extensive searching on the subject including looking for alternative editors, a fairly exhaustive internet search including following all of the links on this StackExchange link and haven't found a way to refresh the code window to reflect the external file changes.
My company doesn't have access to the latest edition of Visual Studio and will not be purchasing it anytime in the near future. Until then, there is code to fix.
Question
Aside from restarting the program are there any methods that can be used to refresh the code displayed in the VB6 editing window?
Check out vbAdvance add on. It will prompt you to reload source file in case of external modification.
I think a found one possible solution.
The MZ-Tools set has an function called Reload file from Disk. It also allowed me to create a shortcut for this function through the MZ-Tools options menu, so I assigned it to the shortcut keys of my choosing.
It's a solution, but I'm still looking for anything that might be better.
VB.NET 2010 project, VS 2010, VSS (think it is 2008).
looking at other posts for this error, seems it is because of a change in a loop, enumeration, etc... In my case, all I do is open the project, make any change, like re-sizing the form, save and close and when I reopen that form I get this error. then I can undo checkout of the code and it opens fine. Not even making a change to any code, just re-size the form. ANY change I make, gets this error. The code is in production already and works fine, and I think it only happens on my pc.
Help! Thank you in advance...
adding - actually it looks like it only happens in changes in the form, and the error is only on the form, not the code. But it happens on any form.
A coworker figured it out for me. It was an issue with DevExpress windows controls and Visual Studio.
Solution is here:
How to enable visual inheritance for Developer Express controls.
When I click on "My Solution" nothing comes up.
I have to use Custom Component Set.
When I try to add a project from the solution, it can't add it.
"The following components could not be browsed." ...projectnamehere
I have to browse for the .dll directly.
Also, not all the /// comments are showing up.
This is a limitation of Visual Studio; some features were cut due to time constraints:
http://connect.microsoft.com/VisualStudio/feedback/details/541514/object-browser-doesnt-open-an-f-dll
(As far as I know, it's still not working brilliantly in VS 2013).
I'm working in a windows forms project using visual studio 2005 sp1, i've a lot of usercontrol that use for my user interface, yesterday i start to have problem with the designmode, when i open a usercontrol all control disappear, i check the design file and the definition of the controls is still there, when i run the app there is no problem.
I try to use this code inside the Load of every usercontrol
if (!this.DesignMode)
{
// Put some logic here
}
however, the problem persist. Today my usercontrol doesn´t display in designmode but either in runtime.
How can be posible? Any suggestion for that?
Regards,
Francisco.
I've had the same problem. Check the .Designer.cs file again and make sure the controls which disappeared are added to their parent controls. Like
this.pCheck.Controls.Add(this.pCheck_bLog_browse);
While checking the differences with previous revisions I figured out that for some reason these lines just disappeared.