Attribute VB_Name = "ModuleX10" Option Explicit Public Const HouseA As Byte = &H60 Public Const HouseB As Byte = &HE0 Public Const HouseC As Byte = &H20 Public Const HouseD As Byte = &HA0 Public Const HouseE As Byte = &H10 Public Const HouseF As Byte = &H90 Public Const HouseG As Byte = &H50 Public Const HouseH As Byte = &HD0 Public Const HouseI As Byte = &H70 Public Const HouseJ As Byte = &HF0 Public Const HouseK As Byte = &H30 Public Const HouseL As Byte = &HB0 Public Const HouseM As Byte = &H0 Public Const HouseN As Byte = &H80 Public Const HouseO As Byte = &H40 Public Const HouseP As Byte = &HC0 Public Const DeviceONE As Byte = &H6 Public Const DeviceTWO As Byte = &HE Public Const DeviceTHREE As Byte = &H2 Public Const DeviceFOUR As Byte = &HA Public Const DeviceFIVE As Byte = &H1 Public Const DeviceSIX As Byte = &H9 Public Const DeviceSEVEN As Byte = &H5 Public Const DeviceEIGHT As Byte = &HD Public Const DeviceNINE As Byte = &H7 Public Const DeviceTEN As Byte = &HF Public Const DeviceELEVEN As Byte = &H3 Public Const DeviceTWELVE As Byte = &HB Public Const DeviceTHIRTEEN As Byte = &H0 Public Const DeviceFORTEEN As Byte = &H8 Public Const DeviceFIFTEEN As Byte = &H4 Public Const DeviceSIXTEEN As Byte = &HC Public Const ALL_UNITS_OFF As Byte = &H0 Public Const ALL_LIGHTS_ON As Byte = &H1 Public Const ONN As Byte = &H2 Public Const OFF As Byte = &H3 Public Const DIMM As Byte = &H4 Public Const BRIGHT As Byte = &H5 Public Const ALL_LIGHTS_OFF As Byte = &H6 Public Const EXTENDED_CODE As Byte = &H7 Public Const HAIL_REQ As Byte = &H8 Public Const HAIL_ACK As Byte = &H9 Public Const PRESET_DIM_1 As Byte = &HA Public Const PRESET_DIM_2 As Byte = &HB Public Const EXTENDED_DATA_XFER As Byte = &HC Public Const STATUS_REQUEST As Byte = &HF ' CM11 Handshaking codes Public Const SET_TIME As Byte = &H9B Public Const INFERFACE_READY As Byte = &H55 Public Const COMPUTER_READY As Byte = &HC3 Public Const ACK As Byte = &H0 ' CM11 Hail codes Public Const INTERFACE_CQ As Byte = &H5A Public Const CM11_CLOCK_REQ As Byte = &HA5 Public Const CP10_CLOCK_REQ As Byte = &HA6 'CM11 Command Header Definitions Public Const STANDARD_ADDRESS As Byte = &H4 Public Const STANDARD_FUNCTION As Byte = &H6 Public Const ENHANCED_ADDRESS As Byte = &H5 Public Const ENHANCED_FUNCTION As Byte = &H7 Declare Function timeGetTime Lib "winmm.dll" () As Long 'for slowing down GUI only Public Sub Pause(ByVal mSecs As Long, Optional bYield As Boolean = True) Dim StartTime As Long StartTime = timeGetTime() + mSecs Do While timeGetTime < StartTime If bYield Then DoEvents 'If GetInputState Then DoEvents Loop End Sub