I have a game I made in windows form and an asp.net website(with a masterpage)
I made a new page in the website called game.aspx and I want that users could play the game inside the website (inside a frame, not another window)
It is possible to host a WinForms user control in a web page, but it is only supported in Internet Explorer, and even there the support is poor.
I would rather suggest that you package the game as a ClickOnce application that you deploy from your web site.
Edit:
If you REALLY want to do it you will find many examples on the web. Try this google search: http://www.google.com/search?q=user+control+host+winforms+web+page+html
This article from codebetter.com looks interesting for example:
http://codebetter.com/petervanooijen/2007/06/18/including-a-winforms-user-control-in-an-asp-net-web-page/
If the game is HTML/JavaScript based then you're all set. But if the game is written in WinForms there is no way to host it from within a webpage without it being installed on the client's machine and using some kind of container (like ActiveX) and some fancy footwork.
You probably want to look at Silverlight or Flash or even HTML5. Implement your game in one of those and it can be played inside the client's browser.
Related
I’m looking for a way to embed a single page style web application into an industrial pc that’s running TwinCAT 3 plc to control an automation system. The hmi on this system is already written in c# using the beckhoff ads dll. What I’m having trouble with is how to embed the server that’s reading and writing data to my plc instance and the web page front end into one application. I’m looking to use c# or python as those are the languages that I have experience in. I would like to be able to log into this webpage by the up address of the Pc and get a page on a phone or laptop that allows elements on the screen to be interacted with like buttons and a joystick style control for creating motion on the machine.
Which OS is the PLC running on? If WinCE, its a bit trickier. You'll need VS2008 to compile against the NET35CF for C#.
With a "full" version of windows, things become simpler - you can use whichever version of .NET will fit on the controller, or whichever version of Python supports the python ADS library.
After that, create your connections into the PLC as per the Beckhoff ADS examples when required by your web page.
Of course you will need to manage the web server accordingly. Some Beckhoff PLCs already use IIS for basic diagnostics, so you would have to set up an appropriate route to your page to avoid conflict.
As a web developer, when I have multiple sites that are related by a common theme or common department, I have a home page that has links to the different sites. For example, there may be a site for reports (output to pdf or excel), another for inputting and editing sales data, and yet another for real-time tracking. Normally these links are in a header or sidebar which is static and can be accessed by all associated apps.
I'm reading about Metro/Modern apps now. I'll be trying to make my first Metro app soon. However, I'm wondering if it's possible to have (at least the illusion) of accessing 3 different apps through 1 app. So the user, just as in the web app, goes to one place.
If so, does anyone have any resources they can share?
To include multiple apps in the same frame they would need to all be part of the same app.
If you want links to jump between apps then you can create a protocol association to launch into the apps. This can include an arbitrary string so you can deep link rather than going just to the opening page.
On Windows 8.1 this connection is one-way: launching the protocol is fire-and-forget. The launching app doesn't get any feedback or results from the launched app.
Windows 10 adds the ability to return results to use the app as a service. I think this sounds more like what you are looking for.
See Auto-launching with file and URI associations on MSDN and the Build session App-to-App Communication: Building a Web of Apps
actually in Windows Universal app it's the same Approach. You got your app, and different pages where you could navigate back and forth... each page with it's unique look depending on your Need.
The user will open one app to Access all...
searching a bit in the net will Show you a lot of examples... Topic: Navigation, LiveCylcles, ...
I've written an application in C# that I would now like to host within an ASP.NET website (MVC 2).
The application can become quite resource intensive so I would like to set up the system in such a way that each user downloads the application and runs it locally, but still within the web page that I provide.
My first idea to solve this problem was to host the program within a silverlight application. However, the app I want to host was not compiled for Silverlight, and I would like to use MySQL in it, which also appears to not be possible directly (ie without a web service in between).
The bottom line is that don't have experience with these things directly yet, and I need to research the way to make any solution possible. So I would really appreciate some input to put me in the right direction, and not have to implement 3 wrong options before finding the right one. I would also really like to avoid JavaScript if at all possible.
Thanks in advance.
Update
I probably should have specified to begin with what the application is exactly.
The application as I want to host it on the website is a simple chat program. It needs an input box and text output. The old windows forms application won't have to run in ASP, but I want to use the class library behind it, which is a chatbot engine. That engine is the part that can be rather resource intensive.
So you wrote a "rich client" application and you want to serve it as a web/silverlight application. This is not possible without changing the architecture of your app, as you probably guess, expecially because you have to interface a database. If rewriting the application to support such architecture is not an option, the best in order to me is to use Remote Desktop, but you have to pay for licenses in order to support many connections.
If your application is not a web application then it will not run on the server. The only thing your server does is to provide a download location. For that, you wouldn't need a MVC site - static pages could fit. The programming model between normal applications running on the client and server applications running on IIS is completely different. So in short: you won't be able to host your client application in ASP.NET MVC. If this is a requirement you will end up rewriting the application.
If your application is ASP.NET WebForms and it becomes too resource hungry, then you probably won't solve it by just switching to MVC. You have different options then: more resources on the server side, analyzing what could be done to lower the resources required or moving away from a server based application. This is not a black/white decision, maybe a combination might fit.
I am new to .NET so I have a basic question to ask, is there a way to add Windows Forms application to my web page, as creating forms was easy and I created my app in the form format now I want to add them to asp.net page.
It's a different thing, but you might want to look into the silverlight out-of-browser technology.
http://www.silverlight.net/learn/overview/out-of-browser-applications/out-of-browser-applications-(silverlight-quickstart)
Spend good time on w3schools.com learning about <form> tags..
then gradually move on towards processing data at backend using C#
a good starting point can be http://www.deitel.com/articles/csharp_tutorials/20060128/index.html
Long way to go..first get your basics right!!
If you have basic knowledge of html, then you can learn the basics of asp.net too. Then you can easily create a web form which exactly matches your windows forms. But always keep it in mind, webforms are not as flexible as windows forms.
well... there are something you can do that is similar.
You can add your windows-form to an BHO and install it in you webBrowser as an ActiveX object (for a IE) or extension (in other browsers), and then share it to everyone you want. Then your win-form application can start and interact with your web-page.
You can start looking here: http://msdn.microsoft.com/en-us/library/bb250436(v=vs.85).aspx
hope it help.
Windows form cannot be added in a web form. They altogether are a different technology. You can add link in your web app for downloading Windows app.
I've read about XSS vulnerability in desktop applications like Skype and ICQ.
I wonder why they choose to use html in this kind of applications that can also be written without any html. Is there a simple reason?
Does someone know if Skype uses html on pages like "Skype Home" only or is the whole GUI written in html?
I'm asking because I'm writing a web application that runs within the browser and will be ported to mobile and desktop platforms once finished. You can compare it to instant messengers but it's something different in fact.
I thought about using PhoneGap to simply "copy" the project to mobile platforms and using system functions via the PhoneGap API. But I think it may be slow and/or not good-looking. Also it wouldn't look native, the question then is whether too use our own html GUI on all platforms (so it looks the same everywhere) or to adapt the design concepts of each platform (using native controls in native languages or e.g. Titanium (which is unfortunately too expensive)).
But I never thought about using HTML in desktop applications. How do you embed that anyway? I'm using C#. Using WebBrowser form element or using some kind of web browser rendering engine?
To answer the initial question (in your 1st paragraph):
I assume they chose to wrote it using HTML as a way to make it cross-platform more easily.
You can't make desktop applications using purely HTML/CSS/JS and have them looking native. However you can use Sencha Touch to make your Phonegap applications look native (to an extent).
Mozilla Prism was written with this idea in mind: http://prism.mozillalabs.com/
Have you tried Appcelerator Titanium Desktop/Mobile. They have a similar idea there - http://www.appcelerator.com/
Thanks.
You can use the WebBrowser control to basically host an internet explorer session in your windows application. This is platform specific, but there is a commercial version which is available for some smartphones: http://en.wikipedia.org/wiki/Mono_(software)#MonoTouch_and_Mono_for_Android.
You can make an HTML5 application which will give you a lot of the benefits of a fat client while maximizing portability with smartphones. You can still have the user save the application to the desktop: http://miniapps.co.uk/installation/. But, that's clunky and, like the desbest said, it will run in a web browser. If you want to maximize the customization, then it looks like PhoneGap is an choice worth taking a look at to me as well.