How to solve Visual C++ window form disappearance? - winforms

I have a visual c++ program which has a few window forms. It does not have any error and can be built successfully. Today I want to add another textbox and a button to one of the form, but I cannot find out my form design window. I see the Form1.h, Form1.resX and my other stuff. Once again, I can built it and the program does not have any error, but the form design window disappear. Please help.

For VS2008
Click View->Resource View or in the Solution Explorer click the Resource View tab
Under "App.rc" click Dialog, you can view your form there

Related

Windows Form Toolbox is empty

In my Visual Studio 2015, Windows Forms Tool Box (where we have controls like Text box, button etc) is not showing up.
I tried checking all the check marks in Views->ToolBars, but no use.
Please help.
Thanks,
Make sure you have opened a Windows Forms project.
Open View menu and check Toolbox or use Ctrl+Alt+X shortcut and you will see the toolbox.
The toolbox will fill with controls when you open a Form or UserControl in design view.

How do I open a WPF menu at design-time?

I'm styling a menu in WPF and would like to see how it looks, without having to launch the application to open the menu.
Is there a way to keep the menu open (so I can see the menu items) at design-time, so I can see the changes as I go?
I currently only have Visual Studio 2010 to work with.
You can set IsSubmenuOpen="True", but if you click somewhere else, menu will close. Set it again to open.
You should be able to see changes in the design window as soon as you make changes - are you using VS2010 express? I found that in express the designer didn't refresh when I made style changes - I had to close/re-open the form to see the changes reflected. You shouldn't need to build to see design changes unless of course you are adding new user controls etc that need to be built before the designer can process them

Toolbar Button with Context Menu? Like New Project Button in Visual Studio

I need a toolbar button similiar to the "New Project" button in the standard Visual Studio toolbar. When clicked, it pops up a dialog. However, it also has a small little down-arrow next to the icon graphic that, when clicked, expands a context menu with more options.
Is there a standard control available with this functionality?
I don't think there's built in functionality for a SplitButton in WPF currently. Here's another thread that may help you out though:
WPF SplitButton?
You could combine a couple of controls together to make one fairly quickly. Might as well make a new UserContol out of it that can be re-used throughout your app as well.
Also, a quick search on WPF SplitButton will return a lot of examples on how to make one or you could get one off of CodeProject or CodePlex (though I'm not sure if they'll come with a image property automatically).

How do I get to the Design Tab in Visual Studio 2010 for Windows Form programming?

I am new to Visual Studio 2010 and I am trying to develop a Windows Form. I do not see a Design tab where I can toggle between the form design and the .cs code. How can I do this?
Thanks
The designer and code will actually be 2 separate tabs. To view the designer, right click the form in the Solution Explorer and choose View Designer. To view code, right click the form in the Solution Explorer and choose View Code.
If you have the code file open, you can right click anywhere in code window and choose View Designer.
tools -> Options -> HTML Designer then click the Enable HTML designer and restart.
I ran into this also. My problem was that without realizing it, I had deleted the declaration of the class and then saved.
Symptoms of this issue include: Wrong icon in Solution Explorer + no "View Designer" option
Moreover, if you double click the form, you result in an empty sheet.
To fix this, simply declare your class once again by double clicking on your form (in my case frmDialogs.vb), and adding the class declaration. Because my class is called frmDialogs, my code looks like this:
Public Class frmDialogs
End Class
Save. Then you will notice the icon return to that of a form, and you will have the ability to enter design mode once again: Normal form Icon and View Designer
Once again we can access the Form in Design.
I hope you find this information helpful! I tried to post with more screenshots but Stackoverflow did not let me since this is my first answer. If helpful please vote for my post as I need 10 reputation points to include more screenshots for future answers. Thanks!

Visual Studio design time event handling

I am trying to create a WPF wizard control in visual studio. I am successful except I would like to navigate the pages in design time by clicking the next and previous buttons. The pages are being written in xaml. I can navigate the pages by going to the properties window and changing the selected index, but I would like something more user-friendly. I remember doing something similar in a winforms project having something to do with overriding maybe wndproc and listening to mouse click events from the designer.
So I've been googling and I can't seem to google the right words to bring this up.
Can anyone please help!
You need to create a custom Adorner as described here. There are two walkthroughs there that should help.
Ultimately, you would need to overlay a transparent button on top of your actual buttons. Then in the click handlers you'd update your selected item/index.

Resources