Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTA: Remove close button from title bar

Status
Not open for further replies.

woter324

Technical User
Jan 26, 2007
179
GB
Hi,

I have a main form HTA with several buttons that open modal or modeless child windows (HTA's). I would like to handle the red cross to do the same as my OK or Exit buttons, but I have read this is impossible (fare enough - Hacker's heaven).

My alternative is to remove the title bar totally. In the main form I have achieved this by setting SYSMENU="no" within the <HTA:APPLICATION> tag.

My issue is that I cannot get the child windows to behave in the same manner. According to three seperate Microsoft pages, within the <HTA:APPLICATION> tag I have added SYSMENU="no" and CAPTION="no" (which one is it M$?). There is also the unadorned sFeature used in the showmodaldialog. This doesn't work for me either.

Here is one of my <HTA:APPLICATION> tags from a child HTA page:
Code:
<HTA:APPLICATION 
     	ID="objPath" 
    	 APPLICATIONNAME="UserCreation"
    	 SCROLL="no"
    	 NAVIGABLE="yes"
		 SINGLEINSTANCE="yes"
   		 WINDOWSTATE="normal"
   		 ICON="..\images\icons\people16x16.ico"
    	 VERSION="1.0.0.0"
     	 SYSMENU="no"
    	 SHOWINTASKBAR="no"
    	 CAPTION="no"
    	 SysMenu="no"
	>

And here is the code I use to open the HTA:
Code:
Set retSG = ShowModalDialog("pages/SecurityGroupsPage.hta",strDisplayName,_ 
							"toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1," &_
							"dialogHeight:1000px;dialogWidth:1000px,top=200,left=200,unadorned=1")

I have tried every purmutation of the unadorned sFeature as documented here, but to no avail.


I have also tried passing showmodaldialog both as an .hta and .htm file. No luck here either.

There is a fare bit of mention that the application has to be 'trusted'. It is my understanding that the nature of HTA's mean they are trusted. Is this not the case?

Would OnUnload help?

Any ideas guys?

Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top