I am working on creating windows form application in c#.
I have a web application. I want to write a windows form application where I provide all the input details required for the web app.
I am completely new to windows Form applications.
Basically I want to add three three text boxes, read the data from it and run the code in the web app.
In a nutshell, I want to make the web application run as a windows form application.
Can any one share some ideas on it.
That would be very helpfull.
Thank you.
Based on your summary, "In a nutshell, I want to make the web application run as a windows form application." I assume you want the ability to run your web application inside of a Windows Forms application. Something like this has its many uses, especially in intranet applications.
All you need to do is:
Drag a WebBrowser control onto your Windows Forms application.
In the Events tab of the Properties window, add a new event handler to the Load event.
In the code behind of your Form, simply call the Navigate() method to your site.
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Navigate("http://blahhhhhh");
}
Related
i have a windows application and now we want to upgrade it to web application.
Is there any way to use same forms from web application
to avoid duplicate work to develop same page in web application.
i want to open windows form on one click from web form. please provide any sample code if possible.
It's not something you can do automatically. You can reuse your business logic behind the application but you have to write a new UI from scratch. You can also try to use some automated tools but to be honest in most cases you will have to put significant amount of work to get your application working the same as window windows application. You must consider and implement new security policy regarding data transfer/presentation in your web app.
As Adjorem said, simply, no. Even if you find a converter it will probably make a mess and you'll need to do a lot of refactoring.
To open your windows app from web app:
You can register your own url protocol to start your application, e.g myfancyapp.
On your website you can create an href="myfancyapp://...". You can parameterize your windows app through a downloadable file with startup infos.
See:
How do I register a custom URL protocol in Windows?
If you want, you can check, if your app is installed with the help of fonts. Install a font (with a special name) with your app installer. You can then check if font is available on your website and display a message "Please install windows app first".
I have developed c# windows application and I want to use ASP.NET code like
Application_BeginRequest event in window application for trace URL.
Is it possible or not?
For the purpose you will need to host the asp.net web service outside of the IIS, because you have windows application.
That is possible by making your windows application also self hosting using OWIN/Kataina. For more information here
I've got an application which for various reasons, has been created as a "website on CD" project. It uses Cassini as the webserver (running as a thread inside the main app) and a C# .NET browser application (which uses the WebBrowserEx control).
The application now has to use a barcode scanner which I cannot easily interface with from within the ASP.NET part of the app, so I was thinking of using a normal WinForms dialog for the barcode scanner, but then I need to pass the data to the ASP.NET app.
How can I do this?
I realise I could put the scanned barcodes in the URL (as CSV) but this seems a bit messy. Is there a way I can directly insert data into the ASP.NET session, or directly call methods in the hosted ASP.NET application or is this not possible? I'm just trying to think of the cleanest way to pass the data back to the ASP.NET app...
Add a WCF Service to the ASP.NET app, and consume it in the Forms App.
I am working on a project where entire application is C# WinForm desktop application. Now our client want to support an action on a form which results in user being charged via his/her Google checkout account. I am wondering if I can provide a checkout interface similar to web browser using windows form or not. If so, How?
have you tried the native winforms WebBrowser control?
The WebBrowser control lets you host Web pages and other browser-enabled documents in your Windows Forms applications. You can use the WebBrowser control, for example, to provide integrated HTML-based user assistance or Web browsing capabilities in your application. Additionally, you can use the WebBrowser control to add your existing Web-based controls to your Windows Forms client applications.
http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx
hi I am developing a application in which i want to show pop up and loading image . for this i need to use jquery can it possible to run these script in .net window application form as iam not using asp .net .
You can add in an internet browser control onto your windows form and load/run the javascript within the browser control.
It's not possible. You must open a popups in windows applications byc creating new form instances.
new PopupForm().Show();