VB.NET - Form is stuck - vb.net

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.

Related

Why is the Access Key E&xit not working in my VB program

I'm writing a VB program where I want to be able to "push" an Exit button with a keyboard shortcut to close the program. I understand that if I put an & in the text of the button (E&xit), I can create a Alt-X shortcut to exit.
I've written programs where it's worked before; it's simple, but now it's not working. In fact, it's not even underlining the x in the text on the button. It's like a setting is telling it to be ignored. (I'm using the latest version of MS Visual Studio.)
I have found that if I turn on the form setting KeyPreview=True, it will work, but the x is still not underlined, so there is no visual indication of the shortcut being available. I feel like I'm missing some setting or switch that make this activate normally. Can someone explain or point me in the right direction? Thanks.
jmcilhinney, well, now it's working, both on new and existing apps, even with keypreview turned off. I think there was something strange going on with Visual Studio that day. Other parts of my program (with KeyPress handling) were not working correctly either at that time. Then suddenly everything started to behave as expected. Or maybe it was something I was doing with Keypress that messed up the Access Keys. I wish I could explain better, but now I can't reproduce the problem.

Form designer only shows the form in vb.net

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!

Stop execution in smalltalk

I´d like to know how can I stop execution in smalltalk. I entered an infinite loop and don´t want to loose the code that´s written. I tried using pause button but doesn´t seem to be right.
Normally, even if you are unable to stop execution, you should be able to get the code changes you made back from the .changes file. If you can restart the image, there is a 'recover lost changes' menu entry. Always first make a backup copy of the changes and image files before trying this. (In Pharo/Squeak. Other smalltalk have similar possibilities)
it depends on the dialect and possibly keyboard settings.
try CMD-. or CTRL-., which works in most dialects.

Member <> is not recognized or is not accessible, while F12 brings me to the definition

To get a head start on a new UWP project, I copy a sample (NavigationMenu from https://github.com/Microsoft/Windows-universal-samples.git) into my own project, learning in the same time.
I am being very careful, and everything looks OK. But I get the above error a few times, while I can jump to the unrecognized member with F12 or actually have intellisense finding that member while typing in XAML.
I am at a lost about what to do to solve this, as I don't see what to "fix".
Is there any way to "debug" XAML in design time?
Thanks for your help!
Bernard
Solved!
The least that I can say is that the errors triggered had NOTHING to do with the real cause!
For whatever reason, I opened the project in Blend. There I saw that I had inadvertently created a click event on a list item (in XAML), so it was not handled in code behind. I just deleted that click event, and everything finally compiled!
Lost quite a bunch of time chasing for false errors in Visual Studio...
If it may help someone else.....

Old deleted form still running at startup vb.net

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.