none
Can't view form in graphical mode

    Question

  • Can someone explain why I can't right click on a form in VB.NET. Select view graphics designer and see the graphical representation of the form?

    I moved a project from VS2013 to VS2017. When I run the project inside the IDE the form show up as I designed it in VS2013. However, when I right-click on the form name(frmMain.VB) and select view in designer a blank form shows, not the one I previously design in VS2013.

    What gives?

    Thanks,


    MRM256


    • Edited by MRM256 Friday, January 11, 2019 7:27 PM misspelled word
    Friday, January 11, 2019 7:26 PM

Answers

  • After I downloaded VS2017. I created a new project. I used Add>Existing Item... to import everything I needed for my project.

    I saved my project. However, it did not save to C:\Users\Mark\Documents\Visual Studio 2017\Projects\<Project Name>.

    Instead it went to C:\Users\Mark\source\repos\<Project Name>.

    This started the whole issue of not being able to see the form designer canvas.

    I think this is the end to this issue. 

    Thanks, 


    MRM256

    Yeah.

    Don't do it that way. Just make a copy of the project folder (the highest one with the .sln) with all subfolders and rename the parent folder to what you want for a backup. Then start 2017 and open project and open the .sln file in the old 2013 folder you made a backup of. It should start up. As I say not sure of database folders.

    Do a practice one form project first without the database you will see. Just open the old .sln with the new 2017. You can go back and forth. Open the new 2017 with the old 2013 ...

    :)



    PS To do a form you only Import Existing formName.VB and not the others. So you have to do it one at a time if you want that way. Same classes and modules.

    To do a conversion open the old project after making a backup and then change it to what you want. Delete add and on and on.

    • Marked as answer by MRM256 Saturday, January 12, 2019 7:26 PM
    • Edited by tommytwotrain Saturday, January 12, 2019 7:28 PM
    Saturday, January 12, 2019 7:16 PM

All replies

  • Well heck I don't know.

    I just made a new form in my project in vs 2013, added some buttons and stuff, saved and exit. Open project in vs 2015 and the form is blank in the designer view. RMB in solution exploer, select view in designer and still blank?

    However if I doubleclick the formname in solution explorer then the controls appear. Now I cant get it to go blank. And after exit without save and open project vs 2015 the form shows the controls and wont go blank.

    Friday, January 11, 2019 8:07 PM
  • I don't either :-). Seems like Microsoft has to change that which was once intuitive.

    All I did is copy my project to C:\Users\Mark\Documents\Visual Studio 2017\Projects\

    This is now a VS2017 project, but in order for it to work I have to leave everything alone in the Project folder. In other words: it won't work if I change anything that has 2013 to 2017. So this project is listed as C:\Users\Mark\Documents\Visual Studio 2017\Projects\Dynamic_DE_2013.

    Thanks for the reply.


    MRM256

    Friday, January 11, 2019 8:15 PM
  • I don't either :-). Seems like Microsoft has to change that which was once intuitive.

    All I did is copy my project to C:\Users\Mark\Documents\Visual Studio 2017\Projects\

    This is now a VS2017 project, but in order for it to work I have to leave everything alone in the Project folder. In other words: it won't work if I change anything that has 2013 to 2017. So this project is listed as C:\Users\Mark\Documents\Visual Studio 2017\Projects\Dynamic_DE_2013.

    Thanks for the reply.


    MRM256


    If you double click the form in solution explorer do the controls then appear and then stay visible?

    Anyone else try it? I have 2013-2015.

    The folder path ie 2017 should not make a difference? It does not to me at least.

    I already had the project in a generic folder, add form in 2013. Then start with rmb start in 2015 without moving folders or any change. Then the form added in 2013 is blank in the 2015 designer. Double click form name in solution explorer and now the controls appear. This is actually a test project I already had in 2015. Just added a form from 2013.

    Anyhow, if someone else can reproduce, maybe in just a one form project? then someone should report it to MS if they had the address. Not that it is a big issue? If you just double click to fix I mean.

    PS I have always been able to move between 2010, 2013, 2015 without problems. I am too lazy to install 2017 so far.


    Friday, January 11, 2019 8:31 PM
  • What bothers me is I can't rename the project from inside VS2017. 

    This is a personal pet peeve. The project is being upgraded from VS2013. Therefore, when I create a project in VS2013 it is saved as C:\Users\Mark\Documents\Visual Studio 2013\Projects\Dynamic_DE_2013. So when I moved the project to VS2017. I would like to Save As C:\Users\Mark\Documents\Visual Studio 2017\Projects\Dynamic_DE_2017. 

    I don't know why Microsoft didn't build this into Visual Studio.


    MRM256

    Friday, January 11, 2019 8:47 PM
  • What bothers me is I can't rename the project from inside VS2017. 

    This is a personal pet peeve. The project is being upgraded from VS2013. Therefore, when I create a project in VS2013 it is saved as C:\Users\Mark\Documents\Visual Studio 2013\Projects\Dynamic_DE_2013. So when I moved the project to VS2017. I would like to Save As C:\Users\Mark\Documents\Visual Studio 2017\Projects\Dynamic_DE_2017. 

    I don't know why Microsoft didn't build this into Visual Studio.


    MRM256

    LOL. Yeah.

    What ability? To know when you rename all the folders in the project from windows file explorer?

    There has to be something saved in the project and that does not update when you change the folder name.

    However, I know what you mean. Its been that way for a while.

    You can only move and rename the project folder for the most part.

    BTW I just have a vbnet\ folder I keep my projects in. You dont have to use the vs default names. Also you can change all the defaults etc. However I find easiest to just leave it and never change the sub folders. Kinda like looking at the sun. But you can if you know how.

    DID YOURS START TO SHOW THE CONTROLS WHEN YOU DOUBLE CLICKED ????

    Friday, January 11, 2019 9:13 PM
  • No. It shows the code.

    I am sure you have looked at what files are stored in each subfolder of a project. The error I got when I tried to replace 2013 with 2017 was it couldn't locate a specific subfolder.

    Like I mentioned before: Whatever happened to the good old Save Project As option :-).


    MRM256


    • Edited by MRM256 Friday, January 11, 2019 9:44 PM Additional info
    Friday, January 11, 2019 9:38 PM
  • Hello,

    Concerning the inability to view the form's canvas in design mode. When viewing the form files in Windows Explorer you should see three files for VS2013 projects e.g.

    While in Visual Studio 2017, select the project in Solution Explorer, select the IDE "Project" menu, select "Show all Files".

    A form should appear as shown below (ignore the plus symbols) when you expand the form after selecting "Show all Files".

    If all the above checks out then, question, are there any third party controls used on the form in question? If so this can be an issues.

    With "Show all Files" selected inspect the .Designer.vb file contents for anything out of place.

    Try traversing to the obj folder of the project via Windows Explorer, delete the folder, build, any change?

    Have you tried a different version of the Framework?

    Generally speaking the root causes are a) missing one of the files which makes up a single form b) controls that don't work in new versions of Visual Studio c) the computer graphic resolution (yeah it's possible).

    BTW there is no "view graphic designer", this is what I have on two different computers.


    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

    Friday, January 11, 2019 11:03 PM
    Moderator
  • Hi Karen,

    Here is a screen shot of project explorer.

    In VS2013 I right clicked on frmMain.vb and I could see the form's canvas. In VS2017 all I get is a blank form. I assume you are following this thread and know that I copied my project onto C:\Users\Mark\Documents\Visual Studio 2017\Projects.

    Funny thing is: I can open and view the form's canvas if I leave everything alone. If I try to open the form from the default folder C:\Users\Mark\source\repos\Dynamic_DE_2017. The form canvas is blank on the IDE, but shows up when running.

    Boy, do I miss the Save As feature :-)


    MRM256

    Saturday, January 12, 2019 12:25 AM
  • Boy, do I miss the Save As feature :-)


    MRM256

     I don't remember VS having a (Save As...) feature,  at least in the versions I have used  VS2008,  VS2010, and VS2015.  What was that in VB6?

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

    Saturday, January 12, 2019 12:49 AM
  • This is not a Visual Studio thing, I've seen this before it's either an issues with a third party or your own user controls between releases of Visual Studio.

    I would recommended removing any non standard control that's not in the IDE toolbox from the form, yeah that is going to be difficult if there is one other than doing the "Show all Files", jump into the .designer.vb file and manually removing any non standard control. My next guess is that this will break other "stuff" so it may be a downhill struggle before pushing past this and getting back on track.

    This looks incorrect.

    What are these? Are they used on the form in question?

     

    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

    Saturday, January 12, 2019 1:57 AM
    Moderator
  • I was going to say that!

    MRM, What do you see when you expand formmain.vb?

    Is frmMain the one you mean is the problem?

    Was the startup a module with sub main in the old project?

    Did you rename the module form or any others?

    PS If you import a form using rmb import existing you only select theForm.vb not all the  .designer or .resx.

    Should be as this 2015? view:


    Saturday, January 12, 2019 2:23 AM
  • Hi IronRazerz:

    My memory of VB6 is fuzzy, but I believe it did have a Save As feature so you could move/backup your project to a floppy. Remember,VB6 was used when the only backup medium was floppy disks. BTW - you are correct; no version of VB.NET ever had a Save As feature. IMHO a serious oversight.


    MRM256

    Saturday, January 12, 2019 5:54 PM
  • Hi Karen,

    The MRM_Ctrls.VB and MRM_OleDB.VB are class modules I made. One was for OLEDB database routines, the other to draw dynamic controls in my application. 

    The picture containing the frmMain.Designer.vb, frmMain.resx, and frmMain.vb is how VS2017 showed the project when opened from - C:\Users\Mark\source\repos\Dynamic_DE_2017 from the VS2017 IDE.

    Every control in the form is a standard control included in VS.

    Why does VS2017 save projects to C:\Users\Mark\source\repos\<Project Name>. Instead of: C:\Users\Mark\Documents\Visual Studio 2017\Projects\<Project Name>?

    Thanks,


    MRM256

    Saturday, January 12, 2019 6:06 PM
  • Hi Tommy,

    Yes, frmMain.vb is the one that should show the designer canvas after you select View Designer after you right click on frmMain.vb.

    Here is the expanded node on frmMain.vb

    These show all the controls used on the form. However, they don't show up on the designer canvas.

    Don't exactly know why.

    Thanks, 


    MRM256

    Saturday, January 12, 2019 6:11 PM
  • Hi Tommy,

    Yes, frmMain.vb is the one that should show the designer canvas after you select View Designer after you right click on frmMain.vb.

    Here is the expanded node on frmMain.vb

    These show all the controls used on the form. However, they don't show up on the designer canvas.

    Don't exactly know why.

    Thanks, 


    MRM256

    The .designer.vb and the .resx should be below the frmMain.vb in the tree as I show in the image of form5. For some reason yours are not. Then see where there is another form5 and then the controls in the image I show? I assume it is the same in vs2017.

    It appears you have imported files into the project incorrectly??? You image shows what happens if you import an existing form incorrectly by importing the .vb, .designer, and .resx to the project. Did you import the form and the designer and the resx files? You dont do that. Just import the frmMain.vb and then visual studio will import all the files it requires. As I show for form5 in my project image.

    That is what is wrong. FrmMain is not right, it does not have a designer and resx file below it in the tree.

    Comprende?

    Whether that is all of the problem or not I dont know. If you did that for all the forms you may want to start that over???

    How did the frmMain get into the project? Did you import all the files you found in the 2013 project folder into a new 2017 project using import exisiting? I think that is an error somehow someway.

    PS then as Karen points out in her image the Log.vb has a module symbol (like I showed in an image) so it must be wrong? Is it a form?

    So you may want to do the 2013 to 2017 again. However you don't need to change anything. Just open the 2013 solution using 2017. Don't change anything. Make a backup copy of the folder first using windows file explorer.

    Once you have something running in vs 2017, then if you want to change the project folder name make a copy of the folder using windows explorer and change the folder name to what you want. Don't change anything else.

    That is the new save as... 

    ...now its make copy of entire project folder and rename using windows file explorer.

    You can change the rest of the names from within vs one at a time. I hope Karen will show that. But I normally don't put version names in anything anymore as it is such a pain.


    PS Do a practice one form project first. I am not sure about the database you may need to change something for that???



    Saturday, January 12, 2019 6:27 PM
  • After I downloaded VS2017. I created a new project. I used Add>Existing Item... to import everything I needed for my project.

    I saved my project. However, it did not save to C:\Users\Mark\Documents\Visual Studio 2017\Projects\<Project Name>.

    Instead it went to C:\Users\Mark\source\repos\<Project Name>.

    This started the whole issue of not being able to see the form designer canvas.

    I think this is the end to this issue. 

    Thanks, 


    MRM256

    Saturday, January 12, 2019 7:05 PM
  • After I downloaded VS2017. I created a new project. I used Add>Existing Item... to import everything I needed for my project.

    I saved my project. However, it did not save to C:\Users\Mark\Documents\Visual Studio 2017\Projects\<Project Name>.

    Instead it went to C:\Users\Mark\source\repos\<Project Name>.

    This started the whole issue of not being able to see the form designer canvas.

    I think this is the end to this issue. 

    Thanks, 


    MRM256

    Yeah.

    Don't do it that way. Just make a copy of the project folder (the highest one with the .sln) with all subfolders and rename the parent folder to what you want for a backup. Then start 2017 and open project and open the .sln file in the old 2013 folder you made a backup of. It should start up. As I say not sure of database folders.

    Do a practice one form project first without the database you will see. Just open the old .sln with the new 2017. You can go back and forth. Open the new 2017 with the old 2013 ...

    :)



    PS To do a form you only Import Existing formName.VB and not the others. So you have to do it one at a time if you want that way. Same classes and modules.

    To do a conversion open the old project after making a backup and then change it to what you want. Delete add and on and on.

    • Marked as answer by MRM256 Saturday, January 12, 2019 7:26 PM
    • Edited by tommytwotrain Saturday, January 12, 2019 7:28 PM
    Saturday, January 12, 2019 7:16 PM