none
VS 2015 Community Auto List Members for VB is missing members compared to VS2013 Express and earlier RRS feed

  • Question

  • I have run across a number of situations where the dropdown list for auto list members is substantially shorter in VS 2015 C than in VS 2013 Ex and earlier using language VB.

    For example, when referencing "formDEF" while coding in "formABC", auto list members does not contain "CanFocus" (as well as many others) in VS2015 in order to complete "formDEF.CanFocus".

    VS2015 lists only 28 members for this scenario while VS2013 and earlier lists several hundred members even under the "Common" tab (which no longer exists in 2015).

    I have tried altering Options > Text Editor > Basic > General > Statement Completion >> Auto List Members >> Hide Advanced Memebers (as well as All Languages) with no effect.

    Can someone confirm that this is how 2015 C is supposed to behave?

    Wednesday, February 22, 2017 3:29 PM

All replies

  • What kind of project did you create?  Did you have any VS crashes and restarts?  If you start a clean, new Windows Forms project, does the problem persist?

    The only time I've seen something like this is when I had several instances of VS open, one crashed, and the recovery got confused and loaded forms into a console application.  No errors show up on the forms but there are no public members available beyond the code manually added to the form.


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Wednesday, February 22, 2017 7:52 PM
    Moderator
  • Thanks for the reply. Windows form project.

    No crashes or anything abnormal.

    I created a test project in 2015 C with form1 and form2. While coding in form1 type in "form2." brings up the auto list members with only 28 entries same as in my "real" project.

    I open the test project in 2013 and the list is as expected when coding in form1 "form2."

    I'm not sure if I have an actual issue with 2015 C or maybe it was "dumbed-down" for 2015 C for VB?





    • Edited by skitron Wednesday, February 22, 2017 8:09 PM
    Wednesday, February 22, 2017 8:06 PM
  • Hello,

    If you know a property exist but does not show in the list, have you tried to type it in? I've seen this a few times but not per-say repeatable in VS2015 in vb.net while C# I've not seen this happen.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Wednesday, February 22, 2017 8:07 PM
    Moderator
  • Thanks for the reply. Windows form project.

    No crashes or anything abnormal.

    I created a test project in 2015 C with form1 and form2. While coding in form1 type in "form2." brings up the auto list members with only 28 entries same as in my "real" project.

    I open the test project in 2013 and the list is as expected when coding in form1 "form2."

    I'm not sure if I have an actual issue with 2015 C or maybe it was "dumbed-down" for 2015 C for VB?





    Try "Dim f As New Form2" and then check the members of "f".

    Let's see if it is just an issue with default form instances (which should generally be avoided like the plague anyway).


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    • Proposed as answer by IronRazerz Wednesday, February 22, 2017 10:04 PM
    Wednesday, February 22, 2017 8:55 PM
    Moderator
  • Hi Karen,

    Typing in "canfocus" after "form2." scrolls and highligts the nearest value in the list that it can find; in this case "CheckForIllegalCrossThreadCalls"

    Would you be willing to create a quick test project in 2015 C (if you have it)? Windows form project (VB) with two forms, inside code of form1 type in "form2." and see if "canfocus" shows up on the auto list members?

    Thanks, Mike

    Wednesday, February 22, 2017 9:00 PM
  • Hi Karen,

    Typing in "canfocus" after "form2." scrolls and highligts the nearest value in the list that it can find; in this case "CheckForIllegalCrossThreadCalls"

    Would you be willing to create a quick test project in 2015 C (if you have it)? Windows form project (VB) with two forms, inside code of form1 type in "form2." and see if "canfocus" shows up on the auto list members?

    Thanks, Mike


    I just checked and yes the list of members is very short on the default form instance.  So just don't use the default form instances.  They aren't really meant for new code projects anyway and are a throwback to VB6 compatibility.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Wednesday, February 22, 2017 9:08 PM
    Moderator
  • I read up on this and tried it. Declaring an explicit instance does produce the full list. However, from what I read it isn't a one size fits all principle according to post 3 in  http://stackoverflow.com/questions/22366944/do-you-have-to-explicitly-create-instance-of-form-in-vb-net

    I confess I was unfamiliar with the issue since I started coding in with VS2008 and code almost exclusively in VB...so never ran across this.

    That said, I think its a bug in Visual Studio 2015 Community since auto list members works without resorting to explicit instances in 2012 and 2013.


    • Edited by skitron Wednesday, February 22, 2017 10:04 PM
    Wednesday, February 22, 2017 10:03 PM
  • I read up on this and tried it. Declaring an explicit instance does produce the full list. However, from what I read it isn't a one size fits all principle according to post 3 in  http://stackoverflow.com/questions/22366944/do-you-have-to-explicitly-create-instance-of-form-in-vb-net

    I confess I was unfamiliar with the issue since I started coding in with VS2008 and code almost exclusively in VB...so never ran across this.

    That said, I think its a bug in Visual Studio 2015 Community since auto list members works without resorting to explicit instances in 2012 and 2013.



     No,  it is not a bug in VS2015,  it is more like a fix in 2015 that will stop people from using the default instances of secondary forms.  As Reed said,  using the default instance of a form should be avoided like the plague and it has been that way since i can remember,  even when i used VS2008.  The only reason you are not familiar with using new instances is because you have not learned that until now.   8)

    If you say it can`t be done then i`ll try it

    Wednesday, February 22, 2017 10:17 PM
  • LOL, OK. If it's a fix it's a very incomplete fix for sure. Use VS to add a new form, still uses default, type it manually it still compiles using default, the start form in a VB project must use the default instance, and on and on.... if shouldn't be used, it shouldn't be supported, no? But thanks for your time and info.
    • Edited by skitron Wednesday, February 22, 2017 10:29 PM
    Wednesday, February 22, 2017 10:27 PM
  •   Of coarse when you add a form in the project it is a default instance.  When your application is executed/ran,  it creates a new instance of the Form1 class,  it is not a default instance of Form1 that you see when it is ran.   Any secondary forms that you use in your app should have a new instance of them created by you.  Also,  i did not say you could not use a default instance,  just that it should be avoided.

     PS -  If creating a new instance of the form has solved you problem,  please mark Reed`s post as the answer.  Thanks.  8)


    If you say it can`t be done then i`ll try it

    Wednesday, February 22, 2017 10:45 PM
  • I read up on this and tried it. Declaring an explicit instance does produce the full list. However, from what I read it isn't a one size fits all principle according to post 3 in  http://stackoverflow.com/questions/22366944/do-you-have-to-explicitly-create-instance-of-form-in-vb-net

    I confess I was unfamiliar with the issue since I started coding in with VS2008 and code almost exclusively in VB...so never ran across this.

    That said, I think its a bug in Visual Studio 2015 Community since auto list members works without resorting to explicit instances in 2012 and 2013.


    Did you read the second post which says, almost verbatim, what I said?  Default form instances are there for VB6 compatibility and should not be used in new development (he even used the "avoided like the plague" quip!).

    The default from instances come from My.Forms and should not be confused with the actual definition of a Form object (e.g. the code generated when you add a new form to the project).


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Thursday, February 23, 2017 12:48 PM
    Moderator
  • Yes I read all of them. The third post indicates that the behavior was introduced deliberately by MS just as you stated. However, since it was deliberately introduced and anounced by MS as such, it seems far fetched imo to consider that behavior is taboo for actual use (the position taken in the third post). It is even more far fetched imo to consider support for that deliberately introduced behavior to now be stealthily being removed by MS in pieces, as you've suggested is the purpose of the current auto list members behavior in 2015 C.

    Therefore, I cannot mark the question as answered. In my mind 2015 C has a bug as is confirmed by all previous versions that do support the functionality as announced as of (I believe) 2005. To me, the only thing answered is the question "does 2015 C have a bug in this regard?", which imo is "yes".

    Please understand I'm not trying to be argumentative for the sake of arguing, I simply see things differently than yourself. But despite that I truly do appreciate your time and information.

    Thursday, February 23, 2017 4:24 PM
  •  No hard feelings taken from your replies.  We can disagree without arguing.  8)

     Just to clear it up,  i did not say that they have intentionally removed this functionality,  it was just my opinion that it was "more like a fix" knowing that default forms should not be used like this and i see plenty of questions about problems people have which turn out to be from using the default forms.

     As was said in that link,  it was for VB6 compatibility.  However,  they did drop support for VB6 so,  maybe they did intentionally change this.  Who knows???

     If you really want to know if it was intentional or not before calling it a bug,  you should ask the developers of VS or maybe try asking in the Visual Studio General Forum.   8)


    If you say it can`t be done then i`ll try it

    Thursday, February 23, 2017 5:14 PM
  • Yes I read all of them. The third post indicates that the behavior was introduced deliberately by MS just as you stated. However, since it was deliberately introduced and anounced by MS as such, it seems far fetched imo to consider that behavior is taboo for actual use (the position taken in the third post). It is even more far fetched imo to consider support for that deliberately introduced behavior to now be stealthily being removed by MS in pieces, as you've suggested is the purpose of the current auto list members behavior in 2015 C.

    Therefore, I cannot mark the question as answered. In my mind 2015 C has a bug as is confirmed by all previous versions that do support the functionality as announced as of (I believe) 2005. To me, the only thing answered is the question "does 2015 C have a bug in this regard?", which imo is "yes".

    Please understand I'm not trying to be argumentative for the sake of arguing, I simply see things differently than yourself. But despite that I truly do appreciate your time and information.

    You are welcome to file a bug on Connect, but it probably won't go anywhere since we are now on VS2017 (though its likely that 2017 behaves similarly).

    At the end of the day, one should not develop new projects against the default form instances except perhaps in the most simplistic of cases.

    One other note; I confirmed the behavior on 2015 Pro so it is not isolated to Community Edition.


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Thursday, February 23, 2017 5:59 PM
    Moderator
  • Also, for the purposes of this forum, I believe the question as been answered to the extent possible.  Any further discussion will need to take place on Connect where someone from MS can respond directly to the request, and if it is refused, explain why.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Thursday, February 23, 2017 6:03 PM
    Moderator