flat assembler
Message board for the users of flat assembler.

Index > Heap > Create GUI Desktop apps for Windows with HTML/Javascript

Author
Thread Post new topic Reply to topic
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY
I don't know if you heard about it, but MS Win supports hta files:
http://msdn.microsoft.com/en-us/library/ms536496(VS.85).aspx

You can code an application in HTML and Javascript and save as .hta and it will run!

Example code:
Code:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>My APP</title>
</head>

<body bgcolor="#EBE9ED">
<script language="JScript">
function Go() {
        var x = parseFloat(document.getElementById('T1').value)
   var y = parseFloat(document.getElementById('T2').value);
  var z = x + y;
      document.getElementById('T3').value = z;
}

</script>

<form method="POST" action="">
  <p>Number 1: <input type="text" name="T1" size="20"></p>
  <p>Number 2: <input type="text" name="T2" size="20"><input type="button" filtered='Go()' value="OK" name="B1"></p>
  <p>Result: <input type="text" name="T3" size="20"></p>
</form>

</body>

</html>
    


It was created visually in MS Frontpage.
Save as test.hta and double-click it!

Also, there's a Hidden tool in MS Win XP and Vista that creates self-extracting executables (able to extract to temp folder and run the app).

Just run it: iexpress.exe

It's nice and easy to create installations or self-contained .EXEs if your application requires lots of DLLs.

You can pack all .hta files into a single .EXE with it.

MS has pretty unknown useful tools. Wink
Post 31 May 2009, 17:39
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2914
Location: [RSP+8*5]
bitRAKE
The board filters the text:

The word filtered is put where "On Click" was (no space).
Post 31 May 2009, 20:33
View user's profile Send private message Visit poster's website Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8970
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
it would be really cool if i could access to dll under the javascript function there.
is that possible under .hta?
Post 01 Jun 2009, 17:55
View user's profile Send private message Reply with quote
windwakr



Joined: 30 Jun 2004
Posts: 827
Location: Michigan, USA
windwakr
What else does the board filter?
OnClick
Code:
OnClick    

Code:
<input type="button" OnClick='Go()' value="OK" name="B1">    


So, when does it decide to filter it?
Post 01 Jun 2009, 18:57
View user's profile Send private message Reply with quote
drhowarddrfine



Joined: 10 Jul 2007
Posts: 535
drhowarddrfine
You'll have much better solutions and cross platform compatibility by using XUL instead. It's XML and Javascript (JScript is not exactly the same thing and non-standard).

You can also look into the Google APIs and a lot of Web APIs are coming up fast.

btw, the html you show is invalid, too.
Post 01 Jun 2009, 19:20
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.