Public Member Functions | |
AddImages ([in] IDispatch *newVal) | |
Adds the ImageList object. | |
SetThumbnailClip (LONG Left, LONG Top, LONG Width, LONG Height) | |
Selects a portion of a window's client area to display as that window's thumbnail in the taskbar. | |
Properties | |
IDispatch *RW | Buttons [] |
The Action object for buttons configuration. | |
LONG RW | State [] |
Type and state of the progress indicator displayed on a taskbar button. | |
ULONG RW | Max [] |
Maximum value of the progress indicator displayed on a taskbar button. | |
ULONG RW | Position [] |
Current value of the progress indicator displayed on a taskbar button. |
Windows 7 required. On previous versions object methods can be used but will do nothing. The maximum number of buttons allowed is 7 (Windows limitation).
o = new ActiveXObject("Scripting.WindowSystemObject") f = o.CreateForm(0,0,0,0) f.ClientWidth = 500 f.ClientHeight = 400 f.CenterControl() with (f.TextOut(10,30,"TaskBar Example (Windows 7 required)")) { Font.Size = 16 Font.Color = 0x000000FF } with (f.TextOut(10,60,"Move mouse over Application Icon in the TaskBar")) { Font.Size = 14 Font.Color = 0x000000FF } Images = o.CreateImageList() Images.Load(ResourceDir()+"ToolBar.bmp") f.TaskBar.AddImages(Images) with (f.TaskBar.Buttons) { with (Add("Button 1")) { ImageIndex = 0 OnExecute = ButtonClick } with (Add("Button 2 (DismissonClick)")) { ImageIndex = 1 OnExecute = ButtonClick DismissonClick = true } with (Add("Button 3 (Noninteractive)")) { ImageIndex = 2 OnExecute = ButtonClick Noninteractive = true } with (Add("Button 4 (Nobackground)")) { ImageIndex = 3 OnExecute = ButtonClick Nobackground = true } } function ButtonClick(Sender) { f.MessageBox(Sender.Text) } f.DrawImage(10,100,400,250,ResourceDir()+"TaskBar.jpg") function TimerExecute(Sender) { Position = f.TaskBar.Position Position += 4 if (Position > 100) { Position = 0 State++ if (State % 4 == 1) { f.TaskBar.State = o.Translate("TBPF_PAUSED") } else if (State % 4 == 2) { f.TaskBar.State = o.Translate("TBPF_INDETERMINATE") } else if (State % 4 == 3) { f.TaskBar.State = o.Translate("TBPF_ERROR") } else { f.TaskBar.State = o.Translate("TBPF_NORMAL") } } f.TaskBar.Position = Position } f.TaskBar.Max = 100 State = 0 t = o.CreateTimer() t.OnExecute = TimerExecute t.Interval = 50 t.Active = true f.Show() o.Run() function ResourceDir(){return CurrentDir()+"..\\Data\\"} function CurrentDir() {s = WScript.ScriptFullName; s = s.substring(0,s.lastIndexOf("\\")+1); return s }
AddImages | ( | [in] IDispatch * | newVal | ) |
SetThumbnailClip | ( | LONG | Left, | |
LONG | Top, | |||
LONG | Width, | |||
LONG | Height | |||
) |
Selects a portion of a window's client area to display as that window's thumbnail in the taskbar.
IDispatch* RW Buttons |
The Action object for buttons configuration.
ULONG RW Max |
Maximum value of the progress indicator displayed on a taskbar button.
Default: "0".
ULONG RW Position |
Current value of the progress indicator displayed on a taskbar button.
Default: "0".
LONG RW State |
Type and state of the progress indicator displayed on a taskbar button.
This parameter can be a one of the following values: