.net Workflow Foundation Editor - c#

Is it possible to integrate the .net workflow foundation editor (from VisualStudio) or a similar control into an other application?
Otherwise i have to program it by my self.
I have to realize an interactive diagram chart in which the user can put in new actions, parameter and something.
Thanks for your information!

It is! :)
The technique is called "Workflow Designer Re-Hosting", and you can read more about it on MSDN.

Yes, it is possible. In the project I am currently working on, we use the Workflow Foundation designer in a WinForms front end. You can see a screenshot here. But I cannot tell you exactly how it is done because I joined to project when this was already done.

Related

integrate C# UI (WPF) with flow chart

Recently, I try to develop an UI by WPF.
As a requirement, I have to put some flowcharts on the form.
And I've already tried my best to find some open resource for my project.
for example:
http://www.codeproject.com/Articles/22952/WPF-Diagram-Designer-Part
However, I have no idea how to integrate third party resource into my WPF project in VS2013 from very beginning at all.
(I know this sounds stupid...I'm totally new to this kind of development.)
My expectation is : to include whole third party resource into my project, so that I can drag some utility of them, double click on it and write some code
- just like how we usually do to default utility provided by VS2013 (say:button, textbox,treeview...etc.)
I hope there would be someone who can teach me how to do this, thank you.

Unable to set start page (to windows form) in MFC application

At a broader level, I'm converting a MFC application (MFC 6.0) into Windows Forms application (Visual Studio 2013). I read certain blogs that describes that this conversion is possible. By this conversion I can re-use code written in MFC, only I will need to create UI. However I will need to understand the previous code and may need to re-write it a bit.
I got the motivation from here and here.
I have performed following steps so far.
Opened Visual C++ 6.0 project in Visual Studio 2013.
Build it successfully.
Then added CLR support to it, and fixed errors.
Added a Windows form, and added controls to it. As mentioned here.
Added functionality and build it successfully.
Now when I run this application, then it still point to old MFC window.
I'm missing certain settings which will change the rendering window from MFC to WindowsForm. What am I missing here?
Addition to that, I see problem with this approach as described by #Roger in comments, and I understand that. So, I wanted to know for any tool/utility which may convert legacy code into C#. Does such utility available?
TIA.
The code you are referring to seems suitable for amending a MFC application with a few forms as child windows to make use of .NET features. However, the main window is another story. You wrote the application is huge, so I suppose you don't want a simple form as your main window and rather have some kind of MDI interface in mind. If you replace the CMainFrame in the legacy MFC application, it just doesn't make sense to maintain an old CWinApp class. Anyway, if you are hell-bent on going down that path, you may want to have a look at an old CodeProject articel (.NET1.x, .NET2.x) to get a better grasp at the whole concept.
But as Roger already suggested, it would be a wise choice to find a nice GUI framework, perhaps even WPF instead of WindowsForms, and do a GUI rewrite -- especially if one part of the motivation for the conversion is to move to newer UI concepts. If your C++ program logic is well separated in your MFC project, put it in a COM server and make use of interoperability.

Buttons to Message Box in Visual Studio 2008

Is it possible to add custom buttons (or) User defined buttons inside Message Box in Visual Studio Windows Forms application ?
Here's a quick guide to making a custom dialog box, which is going to be the ideal solution for you in this scenario, in my opinion.
The simple answer is: no it's not.
The long answer is that it's not possible using the managed API but it may be possible using the Win32 API. Here's a good tutorial on using Windows Hooks to customize the operating system message box dialog.
The .net MessageBox class does not offer such functionality. However, the native Win32 API does so through the TaskDialog API. The main advantage of this approach, as opposed to writing a custom dialog, is that you will be using a native system component and so your dialog will feel at home on the platform.
A very simple example of the task dialog looks like this:
And there is lots of scope for much more complexity, as is explained in the link above.
You'll need to p/invoke to this function. It's one of the more messy functions to call so expect a little work before you have a working solution. You can find some C# code to wrap it up here, but I can't say that I personally have experience of this.

How to display a form inside another form like Visual Studio

How does Visual Studio and other similar programs display a form in their IDE?
Is it possible to achieve the same or a similar effect using C# or VB.NET?
Please see the picture below to get what I mean.
If you are talking about hosting a Winforms editor in your code, it is entirely possible and is actually built in to the .NET framework!
The Essence is the IDesignerHost interface. The whole system is complicated, but can be done (I have done it in production code for runtime layout configuration editing). There is a sample of code from Microsoft here.
I'm sure if you search fir 'IDesignerHost' you'll find enough reference material to figure it out.
Are you speaking about UI creating tools?
Refer to http://www.icsharpcode.net/opensource/sd/ - SharpDevelop for deep dive. It's open sourse, so you'll be able to find out more details.
I believe what you want is a multiple document interface (MDI) see http://msdn.microsoft.com/en-us/library/ms973874.aspx for more info.

How do you display a message in web forms using .cs code in visual studio 2008?

In visual studio 2005, we can get message.show() to display the message.I required the method in visual studio 2008.
I don't believe that there is any change in the code from VS2005 to VS2008.
But accordnig to the title of your question ("diplay a message in web forms"), I assume that you are using ASP.NET (if you meant win forms, RichardOD has already answered your question).
You should use javascript function
alert('This is my message.');
to show the message.
Check this article - it contains a great implementation that you can use right as a MessageBox in winforms.
if it is webform, you could use
Response.Write("Your Message")
Method.. if you want the message box, you could use javascript
alert('your message')
if it is windows forms, use
Messagebox.Show("your message")
hope this helps u
This hasn't changed in 2008. Are you sure you mean Web forms, it sounds more like you mean Windows Forms- see here: http://msdn.microsoft.com/en-us/library/system.windows.forms.messagebox.show.aspx
If you need further help please elaborate your question.
You probably mean MessageBox.Show(). MessageBox is a class in the System.Windows.Forms namespace; this class contains the Show method which when called, should draw a window on a screen. Now this is all different with web! Web is not a one machine application like your windows form, web is a client/server architecture, where there are two major parts of your application: the server where you deploy your code, and the client (the browser responsible for rendering the output of your code). I will not digg in much details for now, I strongly recommend that you learn about the web and its Client/Server architecture first. Thanks

Categories

Resources