I'm new to vb.net and need some help.
I'm not sure what's happening but a deleted main form loads on start up even after setting a new form as start up.
I took a few buttons and copied it on a group container and named it Dial Pad on the old form. After testing to see if it works I adjusted the dimensions and ran again but this time it stayed the same. I clicked on the buttons but nothing happened. Check the code and there was code in it and correct. However there seem to be other set of buttons name as same but with a 1 at end.
I checked the solution explorer and it didn't show, only the originals showed. After frustration I created a new form and copying the code and created new controls. I deleted the old problematic form and set the new one as start up but the old form with the dial pad still appears and only exit button I added and coded works. The datagridview on old forms works as well and is the old way I can get to the other forms which still work.
This problem sometimes indeed occurs. The solution is pretty simple. Go in the menu to Build > Clean Solution and rebuild. Or else, open the context menu on the solution node and select Clean Solution.
Screenshot of the menu:
Screenshot of the solution node context menu:
I had the same problem with a web page in VB. Rebuilding website/solution didn't work for me. The only things that worked were 1. Completely restarting VB or 2. File -> Close Solution and then loading it again File -> Recent Projects and Solution. This one at least spares some time.
Related
I was working at the forms designer and yesterday the designer literally only showed the form. Tried copying the .designer.vb to another new form and the same thing happened. Also when built it just shows what the designer shows. Compare the two versions:
(Had to use pastebin as the code is too long for a post, and it rejects my post if more than two links are used.)
Current code: pastebin.com/SsgR7YWD
Current form view:
Previous code: pastebin.com/bXCL3jhH
Previous screenshot:
Why it is not showing the controls? I know it is a long piece of designer code but I can't find where the error comes from.
I've just run your code through this site that compares to blocks of text and shows the differences - there's a lot - you might want to do the same and have a look at the differences. It may be easier to delete the form and start again to be honest. Having said that, you might be able to spot what went wrong
You should just delete the form and start again. A few tips to having a better UI ---
Use layout grids for the button-checkboxes and let the buttons occupy the whole horizontal space.
And remember to backup your code often so that things like this won't happen again - use something like GitHub and commit your files whenever your day is finished.
Happy coding!
I just had a really weird thing happening on the application I'm developing.
Everything was doing well until, suddenly, I can't do any change on my form.
If I modify something in my form, a button text for example, it appears with the new name in the designer but if I start the application it runs with the previous version of the text in the button. I tried modifying a lot of things, position, text, color, really messing up my design but when I start it I don't see any change... I even tried to change things from the code (change button text on form load) but still no change... I try shutting down and restart the PC, no better luck...
I probably have touched something somewhere that cause this problem but I do not know what and this turns me nuts...
Other apps I made before are still running perfectly and running with new content if I edit their design form.
Any ideas ?
Thanks a lot.
Vince
I have an App that I inherited in VB6 and have ported mostly to VB.net
When I compile / run the app - it highlights all the files in the current selected folder.
What makes it worse, is it's very difficult to search online as what search terms does one use?
The app was ported to VS 2005 - quite successfully - but this has me stumped...
I have tried commenting out all the code that's run on startup and it still does it, so it must be some sort of background thing...
Any ideas?
I can't find an old version of my app to see if it's changes I have made and I don't know where to begin. See the image:
The top part is before I run the app, the bottom is once the app is running and has focus. I hope it makes sense
Also, if I'm browsing and then run the app, and go back to the browser, when my app gets the focus again, the webpage goes back to the top...
The folder is just an example - Basically when I compile (or later run) my App, if I go to Windows Explorer - when the app gets focus - whatever folder I am in has all its files highlighted. If instead of going to Windows Explorer, I go to a web browser, when the app gets focus the browser goes to the top (similar to Home).
There is Windows Integratio, but I have commented out what I can and still am no closer.
Does this info help?
I found the problem - after going back to the vb6 project and removing everything except for the 5 modules needed to startup and I eventually tracked the problem.
There was some code being called when two edit boxes received focus which called send keys home and end - hence it would go home - select all files to the end. I had deactivated one of the edit boxes to not receive focus and it helped temporarily(obviously until the other box got focus), but since deactivating the send keys when they get focus has helped. Albeit an arbitrary problem, maybe it will help someone in the future..
I have a VB.2010 Windows Desktop App that has been running for years.
As of this morning there is 1 form out of dozens of forms the app has does not show any of the controls in designer mode and not even the correct size. Look like a brand new form except the form does not any text (new form would be form1, etc.). Yesterday there was no problem.
The designer module is there as is the resx module.
When looking at the Solution Explorer showing all files the modules appear but no indented under the vb module. It is almost like VB is treating them as totally separate modules.
Went to a back of the source folder from 5 months ago and it has the same problem for the same form.
If I run the app the form does show all the controls but I am not able to see / change the controls in designer mode.
Every tried re-booting the machine.
Since the 5 month old backup has the same problem it is not something in the source. So restoring the source would not help.
Looked at another VB.2010 app that is very similar to the above that uses the 'same' forms but in a different folder and this program does NOT have the problem.
HELP!!
All the controls where there. I fixed it by removing and deleting the 'bad form'. Then doing an add existing items from a backup folder (actually created when the form was still bad).
So there is/was nothing wrong with the source and I have no idea what caused it, why backups didn't work on 2 PCs, etc. etc.
Don't know if it will stay fixed but I am ending the day (yesterday) on the above good :)
Filed in: X-Files
I have written a program and have used it (in debug mode) multiple times to test it out sometimes adding code and/or changing it. After a while any code I wrote or new buttons or features I added to the form would not appear while debugging. I don't know what circumstances led to this.
The only solution I found was to rewrite my code from scratch, however, the problem came back after a while. I don't know what is going on and I can't move on without starting all over again.
Thanks for all the help.
try rebuilding your entire solution, I believe to do this you must right-click on the project and there should be a menu option that says "rebuild solution". Try that.