code: def register_on_can_show_window(self, callback):
          
          event_type = library.VBoxEventType.on_can_show_window
          return self.event_source.register_callback(callback, event_type)
docs: Set the callback function to consume on can show window events.
          This occurs when the console window is to be activated and brought to
          the foreground of the desktop of the host PC.  If this behaviour is
          not desired a call to event.add_veto will stop this from happening.
  
          Callback receives a ICanShowWindowEvent object.
  
          Returns the callback_id