locked
textbox disappears RRS feed

  • Question

  • Hi Everyone:

    I have a very strange behavior which I have no idea why it is happening, and I was hoping that someone would be able to answer.  I did create this project way back in VB.NET 2008, and I took the code and recently compiled it with the 2019 version.  It works fine, except today, two of my customers said that on their machines (an HP laptop and I do not know the other one, both running windows 10) the software does not work.  Images are shown below.

    Image 1 shows the normal way the software should work, and it has worked for many many years without any problems.

    Image 2 shows how the software looks like on the user's machine with the HP laptop.  Notice that the labels and textboxes on the right side have disappeared, and do not show.

    Image 3 shows how the software looks like on the 2nd user's machine that I do not know what type of machine he is using.  Notice that in the top RichTextbox, the text disappears.

    Finally, Image 4 show the structure of the form.  I have tried to show the different items on it.  The RED rectangle represents a Panel.  This panel contains the RichTextbox and a 2nd panel (shown by the BLUE Rectangle).  The 2nd panel contains a picturebox on the left, plus several textboxes and labels on the right.

    If anyone maybe able to tell me why this may happen that it works on every computer, except these two users, it would be great.

    Thanks for your help.

    Bob

    Friday, September 4, 2020 12:18 AM

All replies

  • If I remember correctly, VS2008 forms had a different structure so you could create a brand new form and duplicate what's on the original form controls placed on fresh, give them the same names as the current form and drop in the code. Finally use the new form rather than the current form.



    Please remember to mark the replies as answers if they help and unmarked 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.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Friday, September 4, 2020 12:52 AM
  • Hi Karen:

    Does this mean I have to recreate the form in VS 2019, and copy and paste the code?

    If so and do this, would this get rid of the problem?  as I said this only happens on these two computers, and all my other users have no such problems.  Thanks;

    Bob

    Friday, September 11, 2020 12:42 AM
  • Have two instances of Visual Studio open, one for the old project, one for the new project (or create a new project in the current solution but will need a new name in this case).

    In the old project for the form in question, copy it's size and paste into the new project form then do a CTRL+A, CTRL+C, select the form in the new project and do CTRL+V. Run the new project, verify there are no UI issues and if not port the code from the old project to the new project. I've done this once in the past with a similar problem and it was cleared up.


    Please remember to mark the replies as answers if they help and unmarked 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.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Friday, September 11, 2020 2:35 AM
  • Did you design this form in Designer, or do you use some code to place the labels, textboxes, etc. programmatically?

    Did you check the program in Windows 10?

    Maybe it is possible to provide the project (sources), perhaps simplified, to try to reproduce the problem.

    Friday, September 11, 2020 8:23 AM
  • If I remember correctly, VS2008 forms had a different structure so you could create a brand new form and duplicate what's on the original form controls placed on fresh, give them the same names as the current form and drop in the code. Finally use the new form rather than the current form.



    Please remember to mark the replies as answers if they help and unmarked 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.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    @Karen:  I don't believe this is true.  I use VS2008 Pro predominantly with Windows 10, mostly because VS2010 was a joke out of the gate and VS2017 never supported driver development, so it just seems wiser to stick with what works even as it becomes more and more outdated.  I do freelance online, so it's not uncommon for me to make a copy of all types of VS2008 Projects and open them in VS2019 (to ship source to a client), and the automatic upgrade process works fine every time. 

    Once in awhile I lose track of a reference or two during that project upgrade process, but never actual controls on the Form... unless they were provided by one of those lost references.  That should generate build errors though, or definitely runtime errors at least, instead of just not showing the forms/controls.

    I think Karen's second post (rebuild the form in VS2019) has some merit, but I also suspect the real culprit is going to be something like:  You upgraded your project from VS2008 and DotNET 2.0 or 3.x to VS2019 and DotNET 4.z.z.z.z while erroring user A has a highest DotNET version of 4.y.y.y.y and B has 4.x.x.x.x (or any combination of alternating version incompatibilities).  That should present runtime errors too, but as DotNET and VS have grown outside the bounds of real DotNET and do this stupid thing where they try to be everything to everyone it's all developed really strange behaviors.  If you just upgrade the Project/Solution to VS2019 and leave the target Framework alone, then make your users install that older targeted Framework, I think the problem will go away.

    Viorel_ makes a good point too:  It's always going to get you more and better help and suggestions when you post the code than when you post screenshots alone.


    Before you can learn anything new you have to learn that there's stuff you don't know.

    Friday, September 11, 2020 2:26 PM
  • Hi booboo_US,

    How is the question going? Please let me know if you need further assistance.

    Besides, If your question has been answered then please click the "Mark as Answer" Link at the bottom of the correct post(s), so that it will help other members to find the solution quickly if they face a similar issue.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, September 14, 2020 8:57 AM
  • Hi Xingyu:

    On my system, and all my customers' systems, there are no issues and my software runs fine on windows 8, and 10.  However, on two of my customers the problem shows up.  It is only on these two systems.  so, I am not sure about the details of their systems other than it is windows 10.  Once I hear from then, then I can tell whether the problem is resolved or not.

    Bob

    Wednesday, September 16, 2020 12:46 AM
  • Hi Viorel:

    Yes I used the designer to create the forms. 

    On my system, and all my customers' systems, there are no issues and my software runs fine on windows 8, and 10.  However, on two of my customers the problem shows up.  It is only on these two systems.  so, I am not sure about the details of their systems other than it is windows 10.and on my system it.

    Unfortunately, the code is rather long so I cannot post it.

    Bob 

    Wednesday, September 16, 2020 12:48 AM