Milengrad was built during the reign of Hungarian–Croatian King Béla IV after the Mongol invasion of 1241–1242. Around 1303, King Charles Robert donated the fortress to the Cseszneky family in compensation for their loss of Ipolyvisk Castle. The counts Cseszneky sold it soon to Ban Mikcs, who, in 1309, ceded the lordship to the Herkffy family. In 1536, by the marriage between Katalin Herkffy and Miklós Patačić, Milengrad became the two families' shared property. In the 17th century, the Herkffy family became extinct, and the Patačićs followed in the 19th century. Due to the constant warfare with the Ottomans, and probably as well to an earthquake, by the late 17th century several walls of Milengrad fell down, and in 1683 it was already mentioned as arx diruta, a castle in ruins.
References:Rosenborg Palace was built in the period 1606-34 as Christian IV’s summerhouse just outside the ramparts of Copenhagen. Christian IV was very fond of the palace and often stayed at the castle when he resided in Copenhagen, and it was here that he died in 1648. After his death, the palace passed to his son King Frederik III, who together with his queen, Sophie Amalie, carried out several types of modernisation.
The last king who used the place as a residence was Frederik IV, and around 1720, Rosenborg was abandoned in favor of Frederiksborg Palace.Through the 1700s, considerable art treasures were collected at Rosenborg Castle, among other things items from the estates of deceased royalty and from Christiansborg after the fire there in 1794.
Soon the idea of a museum arose, and that was realised in 1833, which is The Royal Danish Collection’s official year of establishment.