An exemplary electronic device is capable of communicating with one other electronic device including a slave display unit. The electronic device includes a master display unit, sensors, and a processor. The master display unit and the at least one slave display unit cooperatively form a united display unit. The master display unit has sub-display areas. The sensors are arranged on the master display unit. The processor determines the position of the slave display unit relative to the master display unit according to the sensors, establish a minimum virtual display area M×N, and determine maximum actual rectangle display area m×n that the united display unit has. The processor further divides an image to m×n sub-images, transmit the sub-images displayed by the slave display unit to the another electronic device, and further control the master display unit to display the determined sub-images.