My existing code is altered by adding a button

25 Views Asked by At

If I add a new button to a VB windows form, all the existing buttons on that form, have part of the first line of their code wiped, as shown in italics below.

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

I then have to go through line by line, manually replacing the missing code. Why is this happening?

It happens on placing the button, before any code is attached. Dragging any type of button to the form has the same effect.

1

There are 1 best solutions below

1
Col Mortimer On

Solved it! Reading another forum, it appears I've been using and earlier version of Visual Studio, where this is a known issue. Updated and all ok.