Javascript/jquery in windows applications

This might be a stupid question but is it possible to use javascript/jQuery in windows applications?

Im making this application in vb.net, just for personal use and im just making it to practice and to learn more about vb.net programming.

I know javascript is ment for web applications but maybe there are ways to use them in windows applications aswell.

Any response or comment is welcome.

Thanks in advance :)

Answers:

Answer

You may be able to find some success with something like Jint to run JavaScript code, but JQuery relies heavily on the presence of the DOM, so using JQuery to work with a VB.net UI isn't going to be possible.

Answer

cscript, wscript and the Windows Scripting Host objects allow you to do things that you can't do from within a browser, but these are very much limited to scripting tasks, and won't allow you to create a GUI.

It is possible to create a VB application that does little more than host a browser window. You could use such a browser window to create a rich jquery UI.

By setting the window.external property from your VB app (see this question and this HOWTO), you can give the embedded browser access to things outside the browser environment, thereby enabling it to interact with the local machine in a manner normally forbidden by a browser.

Answer

I have to disappoint you, this is not possible. Unless there is some browser-emulator tool or some js-engine under the hood in your application, there is obviously no way to link those worlds.

However, if you like the javascript syntax, you can use node.js also on windows platforms. But there again, it is not possible to access the windows API. But there might be a plugin which allows for that.

Answer

Write a Metro application?

You write Metro style apps using familiar technologies like HTML5, JavaScript, and CSS3, or XAML, with C++, C#, or VB.Net code-behind.

Answer

HTML applications (HTA) may give you what you're looking for. They don't seem to get much attention these days but try changing our .htm suffix to .hta and then run it from the command line. I haven't figured out how to debug it, but hey.

Answer

You might want to look at Real Oop with AutoIt and Smuggling Autoit into IE Embedded

There is also JScript.NET.

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.