473,320 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Short-Cut New Chromeless Window

I want to add a short-cut to a windows app similar to launching from a windows
run line

a New window, to prevent changing an existing browser window from moving off a
current logged in session to another web application.

And, I'd like it to be a chromeless window, sans toobars and sized similar to a
popup.

TIA

JeffP.....
Jul 23 '05 #1
4 5950
JeffP wrote:
I want to add a short-cut to a windows app similar to launching from a windows
run line

a New window, to prevent changing an existing browser window from moving off a
current logged in session to another web application.

And, I'd like it to be a chromeless window, sans toobars and sized similar to a
popup.

Perhaps you should ask in a Windows developer forum? One that can
guess what your unnamed "windows app" is that is launched from a
"run line" and has some idea what "sized similar to a popup" means.
TIA


You're welcome.
--
Zif
Jul 23 '05 #2
JeffP wrote:
I want to add a short-cut to a windows app similar to launching from a windows
run line

a New window, to prevent changing an existing browser window from moving off a
current logged in session to another web application.

And, I'd like it to be a chromeless window, sans toobars and sized similar to a
popup.


I am just guessing here.

Something like the following?

window.open("product.xul", "Product",
"chrome,dialog,modal,close=no,titlebar=no,resizabl e=no");

That's something I have been trying out with Firefox and XUL. Have no
idea about Windows or IE.

Regards,
--
Wei
Jul 23 '05 #3
Wei Wang wrote:
JeffP wrote:
I want to add a short-cut to a windows app similar to launching from a windows
run line

a New window, to prevent changing an existing browser window from moving off a
current logged in session to another web application.

And, I'd like it to be a chromeless window, sans toobars and sized similar to a
popup.

I am just guessing here.

Something like the following?

window.open("product.xul", "Product",
"chrome,dialog,modal,close=no,titlebar=no,resizabl e=no");

That's something I have been trying out with Firefox and XUL. Have no
idea about Windows or IE.

Regards,


On IE, if you rename any .html file to .hta, it becomes an "HTML
Application" and launches outside the browser as its own app. There are
additional parameters (and I'll post a sample structure below) that
control the window's appearance and restrictions on things like right
clicking.

The biggest thing to be aware of (for you and any users of your app) is
that an HTA is outside the security sandbox (such as it is) for IE. That
means that while a regular HTML file using Javascript can't access local
files, the registry, etc. an HTA file *can* do all of those things. It
has pretty much unfettered access to the local machine. The example
below contains a function that launches Notepad to edit the HTA itself.

To use an HTA as a basic site container, you're usually best off to make
a full-size <iframe> that has it's src attribute pointed to your
starting URL. This prevents clicked links from opening new IE windows
and keeps everything inside your HTA.

Also be sure to either leave either the sysmenu set to true (giving you
the "x" in the top right or provide a button/link to window.close().
Otherwise, it takes an ALT-F4 to kill the window. To make the example
chromeless, change the CAPTION to "no" instead of "yes".

All of the attributes of the HTA:Application tag are documented at
microsoft.com

-------------------------------------
J Wynia
Myriad Intellect, Inc.
"Web technology that earns its keep."
www.myriadintellect.com
-------------------------------------

----------yourfile.hta-------------
<HTML>
<HEAD>
<TITLE>Your HTA Application</TITLE>
<HTA:APPLICATION ID="yourHTA"
APPLICATIONNAME="Your HTA Application"
BORDER="thin"
CAPTION="yes"
CONTEXTMENU="yes"
ICON=""
INNERBORDER="no"
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
NAVIGABLE="yes"
SCROLL="auto"
SELECTION="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="no"
SYSMENU="yes"
VERSION="1.0"
WINDOWSTATE="normal"/>
<script language="javascript">
<!--
function edit_hta(){
$this_hta = yourHTA.commandLine;
$command = "notepad.exe " + $this_hta;
$objShell = new ActiveXObject("WScript.Shell");
$lngReturn = $objShell.Run ($command, 1, true);
}
// -->
</script>
</HEAD>
<BODY>
Your HTA content goes here. Simply <a href="#"
onclick="edit_hta();">open this HTA file</a> in a text editor and go to
town. If you're looking to make this window look much more like a
regular Windows application, I recommend looking at the <a
href="http://webfx.eae.net/docs/environ.html">CSS values that you can
grab from the current Windows theme</a>. By setting your CSS to use
those values instead of things like #CCCCCC, you can make the HTA app
blend in with the current Windows settings.
</BODY>
</HTML>
Jul 23 '05 #4
J Wynia thanks....

I found that if I use the following I get a new window, and I'll review your
code below..

From a the Windows run line....
run: iexplore.exe http://myserver/mywebapp/mailrem.aspx

I may also try to put a literal in my aspx page that can do the following.

-- re-direct to a new instance browser chromeless window and the required page
-- go back one to restore the original browser window to the previous web
application

I'm not sure what's so confusing my users run a windows application for their
CRM processes, which I can cmd buttons to launch other programs or an internet
browser.

These users are also usually logged into one of a few websites for our business
service partners and they don't like being logged out. They'd prefer a new
browser window.

I have many times launched chromeless windows from w/in my own web app for
clients that run one single web app, but this client has no less than 4 to 6
windows open to their service providers.

I'll post my best solution state when available....

Thanks again...

JeffP.....
"J Wynia" <jw****@speakeasy.net> wrote in message
news:CK********************@speakeasy.net...
Wei Wang wrote:
JeffP wrote:
I want to add a short-cut to a windows app similar to launching from a windowsrun line

a New window, to prevent changing an existing browser window from moving off acurrent logged in session to another web application.

And, I'd like it to be a chromeless window, sans toobars and sized similar to apopup.

I am just guessing here.

Something like the following?

window.open("product.xul", "Product",
"chrome,dialog,modal,close=no,titlebar=no,resizabl e=no");

That's something I have been trying out with Firefox and XUL. Have no
idea about Windows or IE.

Regards,


On IE, if you rename any .html file to .hta, it becomes an "HTML
Application" and launches outside the browser as its own app. There are
additional parameters (and I'll post a sample structure below) that
control the window's appearance and restrictions on things like right
clicking.

The biggest thing to be aware of (for you and any users of your app) is
that an HTA is outside the security sandbox (such as it is) for IE. That
means that while a regular HTML file using Javascript can't access local
files, the registry, etc. an HTA file *can* do all of those things. It
has pretty much unfettered access to the local machine. The example
below contains a function that launches Notepad to edit the HTA itself.

To use an HTA as a basic site container, you're usually best off to make
a full-size <iframe> that has it's src attribute pointed to your
starting URL. This prevents clicked links from opening new IE windows
and keeps everything inside your HTA.

Also be sure to either leave either the sysmenu set to true (giving you
the "x" in the top right or provide a button/link to window.close().
Otherwise, it takes an ALT-F4 to kill the window. To make the example
chromeless, change the CAPTION to "no" instead of "yes".

All of the attributes of the HTA:Application tag are documented at
microsoft.com

-------------------------------------
J Wynia
Myriad Intellect, Inc.
"Web technology that earns its keep."
www.myriadintellect.com
-------------------------------------

----------yourfile.hta-------------
<HTML>
<HEAD>
<TITLE>Your HTA Application</TITLE>
<HTA:APPLICATION ID="yourHTA"
APPLICATIONNAME="Your HTA Application"
BORDER="thin"
CAPTION="yes"
CONTEXTMENU="yes"
ICON=""
INNERBORDER="no"
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
NAVIGABLE="yes"
SCROLL="auto"
SELECTION="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="no"
SYSMENU="yes"
VERSION="1.0"
WINDOWSTATE="normal"/>
<script language="javascript">
<!--
function edit_hta(){
$this_hta = yourHTA.commandLine;
$command = "notepad.exe " + $this_hta;
$objShell = new ActiveXObject("WScript.Shell");
$lngReturn = $objShell.Run ($command, 1, true);
}
// -->
</script>
</HEAD>
<BODY>
Your HTA content goes here. Simply <a href="#"
onclick="edit_hta();">open this HTA file</a> in a text editor and go to
town. If you're looking to make this window look much more like a
regular Windows application, I recommend looking at the <a
href="http://webfx.eae.net/docs/environ.html">CSS values that you can
grab from the current Windows theme</a>. By setting your CSS to use
those values instead of things like #CCCCCC, you can make the HTA app
blend in with the current Windows settings.
</BODY>
</HTML>

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Niels Dekker (no reply address) | last post by:
Is it possible for a standard compliant C++ compiler to have ( sizeof(short) < sizeof(int) ) and ( sizeof(short) == sizeof((short)0 + (short)0) ) ? Regards, Niels Dekker...
99
by: Glen Herrmannsfeldt | last post by:
I was compiling a program written by someone else about six years ago, and widely distributed at the time. It also includes makefiles for many different systems, so I know it has been compiled...
34
by: Andy | last post by:
Hi, Are 1 through 4 defined behaviors in C? unsigned short i; unsigned long li; /* 32-bit wide */ 1. i = 65535 + 3; 2. i = 1 - 3; 3. li = (unsigned long)0xFFFFFFFF + 3; 4. li = 1...
8
by: NilsNilsson | last post by:
I wrote this: short s1 = 0; short s2 = 1; short s3 = s1 + s2; And gor this compile error message: Cannot implicitly convert type 'int' to 'short' What is wrong here?
8
by: Ken Dopierala Jr. | last post by:
Hi, I'm reading the header file of a PCX image and I need to convert 2 bytes to a short. How would I go about doing this? I know that they are bytes 8 & 9 in my byte array. I'm not sure how to...
15
by: Steffen Loringer | last post by:
Hi, I'm using the following function to join 2 char (byte) into one short on a 32 bit X86 platform: unsigned short joinUnsigShort(unsigned char a,unsigned char b) { unsigned short val = 0;...
4
by: slougheed | last post by:
I encountered a problem after we had converted our declarations of 'unsigned short int' to uint16_t. In one instance, whoever did the conversion failed to delete the 'short' keyword so we had a...
10
by: Jim Langston | last post by:
Is the following well defined? size_t IntVal = 65537; unsigned short Length; if ( IntVal static_cast<unsigned short>( -1 ) ) { std::cout << "Value too long to fit in a short" << std::endl;...
10
by: nyhetsgrupper | last post by:
The following code result in the following compilation error: Error 1 Cannot implicitly convert type 'int' to 'short'. An explicit conversion exists (are you missing a cast?) short a = 1; short...
3
by: mathieu | last post by:
Could someone please tell me what is wrong with the following -ugly- piece of c++ code. Why when I explicititely set the template parameter my gcc compiler start getting confused: bla.cxx: In...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.