Programming with Reflection

image\rwnprg32.gif DisconnectOnSleep property



object.DisconnectOnSleep = Value

Works with


Data type




Returns (first syntax line) or specifies (second syntax line) how Reflection responds to a sleep notification from the system when you are connected to a host. Sleep notification occurs when all running applications have accepted a sleep request, or when the system sends a critical sleep notification without preceding it with a sleep request. (See the AllowSleepWhileConnected property for information on how Reflection responds to a sleep request.)

Note: When this property is False, Reflection attempts to maintain connections to the host during periods of sleep. Some configurations, such as a direct serial connection, may be able to maintain the connection. However, in many instances, you will lose your connection during a period of sleep even if you have set DisconnectOnSleep to True. For example, your network or modem hardware may not be able to maintain your connection during a period of inactivity. If you don't want to lose your connections, set AllowSleepWhileConnected to False. This will prevent sleep during periods of inactivity, but will not prevent the system from shutting down due to critical conditions, such as low battery power.


The default value is False.


image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this property