Teun Pronk
Teun Pronk

Reputation: 1399

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 :)

Upvotes: 2

Views: 3585

Answers (6)

Mark Robbins
Mark Robbins

Reputation: 2457

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

There is also JScript.NET.

Upvotes: 0

Dennis Cronin
Dennis Cronin

Reputation: 1

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.

Upvotes: 0

MarkJ
MarkJ

Reputation: 30398

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.

Upvotes: 0

Paul Butcher
Paul Butcher

Reputation: 6956

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.

Upvotes: 1

jAndy
jAndy

Reputation: 236022

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.

Upvotes: 0

Andrew Church
Andrew Church

Reputation: 1391

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.

Upvotes: 4

Related Questions