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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Window title and color

Status
Not open for further replies.

gustaf111

Programmer
Jan 16, 2011
87
SE
Hello all,

Is is possible to change the Window title and the color of the active window with help of a VBS script ?

For example, if I would like to change the title in this window from "VBScript Frum - Tek Tips - Window Internet Explorer" to "This is a test".

Is it possible ?

Cheers Gustaf
 
[0] Title

[0.1] You can change part of the line appearing at the top as title, but you cannot change the part hard coded by the browser: " - Microsoft Internet Explorer" or " - Mozilla Firefox" etc. The simple reason is browsers tried to distinguish itself clear to the user that it is not a desktop application's window which has a broader user's trust to it. The reason browsers are doing so is also due to "social" pressure. If they don't do that, they would be massively criticized.

[0.2] The changeable part via client script is accessed read-write by the reference document.title (vbs or javascript/js), such as this:
[tt]
document.title="This is a test"
[/tt]
[1] backgroud color: you can do it like this:
[tt]
document.bgColor="#ffff00"
[/tt]
[1.1] The above use a six digit hexadecimal for rrggbb; you can also use a subset of named color such as red, yellow etc... (You google to learn more.)

ps: You're constantly (the 2nd time) in forums not the first-choice to ask questions. Maybe you should understand better/read more categories of know-hows. You can use vbscript on client-side, but you should know the range of tools that supports it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top