Creating a wizard in C# - visual-studio

I would like to create a wizard to guide a user through some steps in order to create a document based on a template. I found this solution in msdn:
http://msdn.microsoft.com/en-us/library/7k3w6w59(v=vs.80).aspx
The problem is that this tutorial creates a wizard as a New Item or New Project in Visual Studio. But I would like a standalone application, one in which my user can run the wizard without having Visual Studio.

Related

How to publish Windows Forms Control Library with Visual Studio 2022

I believe this is a question for beginners and I apologize if it was not asked in a right way. I use Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.2.2
The steps I take are:
In the Start Window that asks me "What would you like to do?" I select Create a new project. This takes me to a new window "Create a new project".
In the search field(Search for templates (Alt+S)) I enter "Windows Forms Control" and choose first result. The first result for me is: "C# Windows Forms Control Library(.NET Framework) A project for creating controls to use in Windows Forms(WinForms) applications". and then I click Next.
I click Create because for this question a name or anything else is not something that I have changed. That means(for me) that "Place solution and project in the same directory" is unchecked and that I use .NET Framework 4.7.2
After the project is opened I go to the Build option in the menu and look for the "Publish Solution" option but there is none.
Questions:
Is it possible to publish this(Windows Forms Control Library with Visual Studio 2022) or I just use .dll when I am finished ?
If it is not possible to publish or it is not possible to create some kind of executable file from Windows Forms Control Library why I am able to drag and drop controls like buttons and text fields and with that create some kind of UI?
If it is possible to publish please tell me how?
Is there some kind of list what we can publish or not when using visual studio?
Additional explanation: I followed this: https://learn.microsoft.com/en-us/visualstudio/designers/walkthrough-windows-forms-designer?view=vs-2022 and then at the end of this article there is a "Next steps" part where it says:
This article has demonstrated how to construct the user interface for
a simple calculator. To continue, you can extend its functionality by
implementing the calculator logic, then publish the app using
ClickOnce. Or, continue on to a different tutorial where you create a
picture viewer using Windows Forms.
And I followed the article that is behind the link "publish the app using ClickOnce" and tried to publish.
After some research(more than one try...) I have decided to ask a question here...
Thanks for your time in advance.

Create single form application

I need to create very basic single form application in my MS Visual Studio 2019, Visual c++. I prefer to design this form in designer. I create new application in my Visual C++ by selecting new Windows Desktop Application. As result I got main form that I can't design in designer. I prefer to have dialog style based form similar to About form that I can edit in designer as main form. How to achieve that?
I suggest you could try to use MFC to create a form based on dialog style
First of all, you should installed with the Desktop development with C++ workload and the optional Visual C++ MFC for x86 and x64 component.
And then you could create a form based on dialog style.
1,Use the MFC Application Wizard to create a new MFC application. To run the wizard, from the File menu select New, and then select Project. The New Project dialog box will be displayed.
2,In the New Project dialog box, expand the Visual C++ node in the Project types pane and select MFC. Then, in the Templates pane, select MFC Application. Type a name for the project, and click OK.
3,On the Application Type pane,under Application type select Dialog based. click finish, and you have created a form based on dialog style.
For more details I suggest you could refer to the Doc:
https://learn.microsoft.com/en-us/cpp/mfc/reference/creating-an-mfc-application?view=vs-2019

Visual Studio Custom start page for project

I'm trying to create a custom start page for a custom template using Visual Studio.
What am I trying to achieve?
When a user creates a new project using my custom template from VS menu I would like to show a page after the creation of that project in Visual Studio similar to the below-mentioned page.
Any help regarding this is highly appreciated. Thanks in advance.

Add ATL Simple Object in Visual Studio 2017

I am working with an old ATL/COM project in Visual Studio 2017.
In previous versions of Visual Studio you could select "Add Class" and then select the option "Add simple ATL object" to add a COM class to the project. This option appears to be completely missing in Visual Studio 2017.
Has the option been moved?
Have I missed an installation option?
Does Visual Studio fail to recognize my project as an ATL project? (It was created with a much older version.)
Or is this the end of the road for ATL?
I'm not sure whether this an answer, but it is too much for a comment and more than just an edit to the question.
I have tested on two systems, with
Visual Studio Community 2017, Version 15.1
Visual Studio Professional 2017, Version 15.3.2
and I believe that the functionality has changed between these two versions. I think it is unlikely to be a difference between the Community and Professional versions.
In both cases I created a new ATL project and tried three ways to add a class:
Add class... from the context menu in the Class View
Add class... from the context menu in the Solution Explorer
Add New Item... from the context menu in the Solution Explorer
With version 15.1, Add Class opens the following dialog, from which I can add an ATL Simple Object.
With version 15.3.2, Add Class opens the following dialog, without any option for an ATL Simple Object.
However, with version 15.3.2, Add New Item opens the following dialog, with a new option to create an ATL Simple Object, which was previously not available in this dialog.
So, it seems that the functionality has been moved. Curiously, it is no longer available in the Class View (which in my opinion is a mistake).
This problem is caused by changes in the project template and code wizard in version 15.3 of Visual Studio 2017.
The operation procedure has changed between version 15.2 or earlier and version 15.3 or later.
The blog article that explained this change is as follows.
Changes to Project Templates and Code Wizards in 15.3
Although it is described as an item in the release notes, there are few people who are watching, and details on how the actual is going on is unknown.
Visual Studio 2017 version 15.3 Release Notes
C++ Language Services
Project and Code Wizard
•We have rewritten several project and code wizards in the signature dialogue style.
•Add Class launches the Add Class wizard directly. All of the other items that were previously here are available under "Add > New Item".
•Win32 projects are under the Windows Desktop category in the New Project dialog.
•The Windows Console and Desktop Application templates now create the projects without displaying a wizard. There's a new Windows Desktop Wizard under the same category that displays the same options as before.
My experience with Visual Studio 2015 version 15.9.2 is that I had to uncheck Security Development Lifecycle (SDL) checks when I added an ATL Project, otherwise when I add the Simple ATL Object I get a messagebox with the error "did not find a .idl file in project name of my project".

How to extend project properties page?

Is it possible to add a custom tab to a project properties page in the Visual Studio 2008?
What I want to do is to be able to add a custom tab to properties page for the projects created from default project templates (WPF Application, WPF custom controls library, etc).
Keith,
I'm working on VS add-in for WPF applications localization. I want to be able to manage project specific settings via "project properties" page. I did some research and it seems that it is not possible to extend existing projects in this way.
It seems that during the time this question was asked, this feature was not implemented in Visual Studio SDK.
There's answer for similar question https://stackoverflow.com/a/5325158/2617201 which refers to Microsoft Documentation at Adding and Removing Property Pages. The article refers to Visual Studio 2015 (later versions should have the same feature).

Resources