I beg to most politely differ regarding the usage of firearms by the cavalry.
From the introduction of the wheellock in the 16th century, firearms became a practical armament for the mounted combatants. By the beginning of the Thirty Years War (1618-1648) pretty much all cavalrymen in western and central Europe were armed with firearms (pistols and/or arquebuss/carbine) and sword, while lance-armed cavalry was rather rare (Wallenstein had a famous bodyguard company of lancers).
Similarly, in the English Civil War that followed soon after, the English cavalry was armed primarily with pistols and swords, though Scots at some point decided to arm half of their cavalry with lances (which decision might have been due to shortage of pistols).
Further to the east, the lance however remained as a weapon of war for example by the famous Polish hussars.