Module: VRTasktraySensitive

Defined in:
lib/vr/vrtray.rb

Constant Summary collapse

RegisterWindowMessage =

VRTasktraySensitive

This modules enables to sense the tasktray creation on restarting explorer. The deleted tasktray icons can be created again using this module and writing in its event handler how to do it.

Event Handlers

— self_taskbarcreated

Fired when the explorer restarts and creates its tasktray.
Win32API.new("user32","RegisterWindowMessage","P","L")

Instance Method Summary collapse

Instance Method Details

#tasktraysensitiveObject

coded by Katonbo-san



134
135
136
137
138
139
140
141
# File 'lib/vr/vrtray.rb', line 134

def tasktraysensitive   # coded by Katonbo-san
  # get message ID of 'TaskbarCreated' message
  id_taskbar_created = RegisterWindowMessage.call('TaskbarCreated')
  
  # prepare 'TaskbarCreated' message handler
  addHandler(id_taskbar_created, 'taskbarcreated', MSGTYPE::ARGNONE, nil)
  addEvent(id_taskbar_created)
end

#vrinitObject



129
130
131
132
# File 'lib/vr/vrtray.rb', line 129

def vrinit
  super
  tasktraysensitive
end