none
Accidental changed click event with wheel on mouse. Lost original procedure code

    Question

  • Hello everyone

    This may be the wrong location for this but I have just discovered an issue within the VS2015 properties section. This is on Win 10 Pro PC

    I have a form with various controls (Buttons, Data grid ETC...)

    Today whilst in the properties of a click event I managed to roll the scroll wheel on my mouse. I watched as the event link changed through about four procedure names. As I spotted what had happened I changed it back again.

    However

    When I ran my program (testing the work carried out) I was hit with controls not firing events. When I looked back at my code I noticed the events that I had accidently scrolled through still had the procedure names but all the code for each of these had been deleted.

    Lucky for me I backup up very regularly so was able to recover form this very quickly and easily.

    I am sure this is something that should not happen or there is a setting I have missed that will stop this.

    If this is the way VS2015 community works then other must have had this issue.

    I have also tested this on a button click event and by changing the pointer to a different procedure the code is lost.

    Any ideas anyone??? or is this something peculiar to me

    Regards


    Tuesday, April 26, 2016 8:41 PM

Answers

  • Hi RichyRich1964,

    Could you please tell me what's the version of your VS2015 Community.

    I did a test in my side using VS2015 Community Update2, I wrote a click event, then add a button control. In events, I choose the click event. Anything works well in my side. The code is not been deleted.

    First please try to your Visual Studio in Safe mode to Check whether some add-ins and extensions affect it (devenv /safemode)

    Also try to restore the settings of your Visual Studio(Tools->Import and Export Settings->Reset all Settings). Then create a new windows form application and try it again.

    If still has the same problem. I suppose there might be something wrong with your Visual Studio 2015. Try to repair your VS2015 or install the VS2015 Update2 then try it again.

    Best Regards,

    Lake Xiao

    Tuesday, May 03, 2016 8:04 AM
    Moderator

All replies

  • Hi RichyRich1964,

    Windows Forms General Discuss client application development using Windows Forms controls and features.

    Since your issue is about Visual Studio, I will move your thread to that forum for better support.

    Thanks for your understanding.

    Regards,

    Moonlight


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, April 27, 2016 5:56 AM
  • Thanks

    Hopefully I can follow it to its new location.

    I was originally looking for the Visual Studio Forum but couldn't find it.

    Regards

    Wednesday, April 27, 2016 3:56 PM
  • Hi RichyRich1964,

    Could you please tell me what's the version of your VS2015 Community.

    I did a test in my side using VS2015 Community Update2, I wrote a click event, then add a button control. In events, I choose the click event. Anything works well in my side. The code is not been deleted.

    First please try to your Visual Studio in Safe mode to Check whether some add-ins and extensions affect it (devenv /safemode)

    Also try to restore the settings of your Visual Studio(Tools->Import and Export Settings->Reset all Settings). Then create a new windows form application and try it again.

    If still has the same problem. I suppose there might be something wrong with your Visual Studio 2015. Try to repair your VS2015 or install the VS2015 Update2 then try it again.

    Best Regards,

    Lake Xiao

    Tuesday, May 03, 2016 8:04 AM
    Moderator