The current base window ID is stored in system register LW-9050. This is the ID of the window currently displaying on the HMI. Please refer to the EBPro Programming Manual Section 22 for more information on system registers.