Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I was just sitting and had an idea. I would like to create a full screen program that would function as a menu with a resolution of 1280 x 800 just a background image and a next previous and start program button.

so I can launch some programs for my VR head set with out taking it off. windows doesn't look good in stereoscopic and to be able to cycle through programs would be fantastic.

how would i go about start a project like this?

I just built a few pages in HTML that looked great just what I wanted but soon figure out i cannot launch programs locally DOH! If someone could point me in the right direction that would be great.

thanks for your time

Michael

thought I'd just show this exactly what I would like to create.clicking next button loading a new page different background image different executable program.

"http://www.pczombie.com.au/RiftCoaster.html
Posted
Comments
OriginalGriff 9-Nov-13 8:08am    
Answer updated.

You can't launch programs locally from a web page - not unless the page is hosted on your local machine, and you use code in the code behind.

The easiest way to do this would be to create a WinForms .NET application, that runs maximized with three buttons on it. The "Start" one is pretty easy: just call the Process.Start method with the name of the application as the parameter: http://msdn.microsoft.com/en-us/library/53ezey2s.aspx[^] - the link includes an example in various languages.

The complication comes when you want to use the "Next" and "Previous" buttons to select which app to run - it's not difficult, but it means creating a collection of some form and adding the application names to it, then selecting which one is to be run. As I say, that's not difficult to do, but exactly how depends on your skill and chosen language.

Do you have any programming language skills? Do you know how to create any examples of collections?

" You said it was possible to launch stuff locally via HTML is that right? That's all I really would like to do its just for my personal use.
"


No - HTML has no capability for that at all (for security reasons: if you could do it, so could "malicious" websites).
You can do it in the code behind - the C# or VB code that runs on the server in an ASP or APSX website (but that is a bit overkill for what you want) - you are better off with a purely local solution for the moment.

Do you have Visual Studio at all (preferably a version that includes C#)? If not, get the Express version from here: http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop[^] - it's free from Microsoft! (and a later version than I use!)

When you're ready, reply to this and I'll try to guide you through...
 
Share this answer
 
v2
Comments
Nelek 9-Nov-13 7:40am    
OP answered you in a non-solution. Content:
Hi

Thanks for the reply. Nope I have no program skills I have been playing around on Treehouse.com for a few months just tinkering in projects I like HTML so far just getting the time to tinker and learn.

You said it was possible to launch stuff locally via HTML is that right? That's all I really would like to do its just for my personal use.

From Michael
OriginalGriff 9-Nov-13 8:01am    
Cheers!
enhzflep 9-Nov-13 9:53am    
Er, not quite true with regards to launching local programs from the web-browser.

IE, ActiveX and WScript.Shell will work together to do precisely that! :p
OriginalGriff 9-Nov-13 10:22am    
ActiveX only works with IE, and even then only if it has been enabled by the user - it is turned off for security reasons by default.
Given than this is a complete beginner, I didn't want to add to the confusion by introducing IE specific stuff (and the headaches that comes with trying to use ActiveX)
enhzflep 9-Nov-13 11:59am    
I understand this motivation - I'm often tempted to use the same reason to say something I know not to be strictly true. I think the motivation is noble and a good one.

Unfortunately, as much as many of us would wish it were so, that motivation doesn't change the accuracy of an answer.


(Mind you, my response reminds me of the joke with the Microsoft building and the lost traveller in a hot-air balloon - I'd be in the MS building, for what its worth)
Yep, it's as easy as 3.141592653 (π, pi, pie)

You just need to understand that the technique is limited to Internet Explorer. No other browser that I'm aware of will allow the creation of ActiveX objects.

Try the following code in Internet Explorer - you'll have to accept and waive the security warnings. (I think you can set IE to always allow the creation of ActiveX objects when run from a local site, don't know, cant remember)


HTML
<!DOCTYPE html>
<html>
<head>
<script>
function RunEXE()
{
    var prog = "cmd.exe";
    var oShell = new ActiveXObject("WScript.Shell");
    oShell.Run(prog);
}
</script>
<style>
</style>
</head>
<body>
    <button onclick='RunEXE()'>Open command prompt</button>
</body>
</html>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900