Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb.net 2005 problem

Status
Not open for further replies.

mkohl

Programmer
Feb 22, 2005
82
US
I am currently experiencing a problem with vb.net (2005)
IDE: vs 2005 professional.

<problem> There is a button on the form I created, I deleted the button and ran the program in debug mode, but the button is still there. I restarted vs 2005, retarted my machine and still the button will not go away. If I look at my form in design mode, the button is not on the form. I tried adding a new button in a different location on the form, but the new button is not visible at run time.

On the other hand, I switched from debug mode to release mode, and the changes were made, and the button I deleted eirlier was gone. However, if I go back to debug mode the button re-appears again.

Anyone have a clue of what is going on? This is my first application in vs2005, so I am not familiar with this type of problem.
 
Very strange, I woke this morning the program is functioning fine, however if anyone knows why this program would have did this let me know, please. I did make one change this morning, in the solution explorer I clicked on my project and in the windows application framework settings I checked, "make single instance of application" I compiled in debug mode and it worked. Was this the solution to my problem? I am not sure.
 
Strange behavior. I'm guessing that it's possible you shut down visual studio before stopping yesterday and re-started today. That's more likely than changing the single instance property.

I'm curious as to what the name of the button you couldn't delete was. If it happened to be "CancelButton" or "AcceptButton" the problem could might make a little more sense since they properties of a form.

VS will let you create buttons with these names, but it doesn't handle them properly. Personally, I think this is a bug in VS - you should be told you're trying to set an invalid property value. I've reported it to MS, we'll see what happens.
 
They will probably say to wait for SP1.

And have been waiting for the last 10 months.

Christiaan Baes
Belgium

"My new site" - Me
 
SavantMan,

Sorry I have been kind of busy the last few days. I just want to let you know, that the other day when I had the problem with the button displaying after I deleted it. Was not a naming issue. I always name my buttons, suchas, "btnClose". But the weird thing is when I noticed the problem, I tried to debug thru and see if microsoft had some code hidden somewhere that said I still had a button on my form. I did not find anything so I shut down as normal (saving, .ect) Then I reopened vs2005, and still the button appeared. So then I rebooted my pc, and tried that, but the button was still there. I tried a few other things such as adding buttons changing location of other controls on my form, but everything I changed did not appear when I ran the probram in debug mode, the changes only took place when I changed from debug mode to release. So I kind of gave up, for the night and then in the morning when I first opened vs2005 I went to windows application properties and checked "make single instance application" then I ran the program in debug mode. and all changes that were made the previous night were displayed on the form. So being the curious person that I am, I unchecked the single instance property and and continued building my application. I noticed once again, (after making a few changes and rebuilding a few times) that .net was acting up again, and not displaying the changes that I made. So, I went back and checked the property again. Its working, but then I don't know if it solved the problem, because of the strange behavior.

My question for today is, does everyone have the property "make single instance application" checked? And if they don't are they able to build applications without the problem I have. I might do some more research on this property to see what what it actually does.

Also, once again, I would like to thank everyone at tek-tips for helping me when needed, you guys haved helped me out allot and I hope one day I can return the favor.
 
I do keep the "single instance" checkbox selected. I've always been of the understanding that it checks to see if the process for your application is already running, and if so, stops the launch. It may be doing other things behind the scenes that I'm not aware of. In your checking to try to duplicate the behavior, did you attempt to "clean the solution" (from the build menu) --- if there is something still running in the background holding your previous changes, this *should* fix it.
 
As for your original question, it sounds like the files in the bin folder were not being correctly overwritten. I don't know what would cause it, but if you run into it again, try deleting the bin and object folders in your project's folder.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Rick --- isn't that essentially what using "clean solution" does without the added possible risk of wiping out manually modified config files?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top