Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


How to dynamically change an HTA icon?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,65092
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to dynamically change an HTA icon?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 How to dynamically change an HTA icon? - 10/15/2008 12:05:01 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline

      
 
 
Post #: 1
 
 RE: How to dynamically change an HTA icon? - 10/15/2008 11:07:12 PM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
I still haven't found anything, but I don't think this can be done in vbs.
I'ma start looking in Javascript.

(in reply to TKS)
 
 
Post #: 2
 
 RE: How to dynamically change an HTA icon? - 10/16/2008 1:44:02 AM   
  dm_4ever


Posts: 2669
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
I believe this is correct oHTA.icon = "something2.gif", but might require some type of refresh to take effect.  (location.reload(true) does not appear to be enough)

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TKS)
 
 
Post #: 3
 
 RE: How to dynamically change an HTA icon? - 10/16/2008 4:18:51 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
quote:

ORIGINAL: dm_4ever

I believe this is correct oHTA.icon = "something2.gif", but might require some type of refresh to take effect.  (location.reload(true) does not appear to be enough)


EDIT : Yes, a location.reload would just set it back to default/ icon value... and DOM doesn't seam to work either, which is a pitty. Itll probably be easier to have a function physically replace the icon value and then do a refresh..... probbly.

EDIT : I haven't written the code yet, but I did write something similar for aligning a div and it works okay...


      

Then I just automate a refresh, but I feel like im going out on a limb here for something that's probably just a few lines of DOM code or i dont know... python or php..

< Message edited by TKS -- 10/16/2008 4:21:15 AM >

(in reply to dm_4ever)
 
 
Post #: 4
 
 RE: How to dynamically change an HTA icon? - 10/17/2008 12:54:53 AM   
  TNO


Posts: 1284
Score: 12
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
I haven't checked but I believe a few of the HTA attributes are Read Only, or only looked at when the application starts as a preprocessing instruction.

As a more powerful alternative you could just load the HTA without a top bar and without a window border, then just create your own with something like <div style="position:absolute;top:0px;left:0px;right:0px;height:20px;z-index:1000"></div>

Just don't forget the close button, minimize button, and all that other jazz

Edit:
Actually, don't put it in an inline style, put it in a stylesheet and give the div an ID:

#TitleBar{
     position:absolute;
     top:0px;
     left:0px;
     right:0px;
     height:20px;
     z-index:1000;
}

< Message edited by TNO -- 10/17/2008 12:56:54 AM >


_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to TKS)
 
 
Post #: 5
 
 RE: How to dynamically change an HTA icon? - 10/17/2008 8:33:52 PM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
Hey TNO, I completely forgot about that. And the nice thing about that is its very DOM compatible. Thanks for the reminder & code.

(in reply to TNO)
 
 
Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to dynamically change an HTA icon? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts