One important thing to bear in mind when discussing the tricorn is that its shape as we recognize it today was not seen as a distinct type of hat. (The term does not seem to be used in relation to hats until well into the nineteenth century.) It was a typical round-crowned hat with the brim turned up ("cocked") three times. That is, it was a style of wearing a hat, but not a hat in and of itself.
The thrice-cocked hat was indeed THE (men's) hat of the eighteenth century. I discussed its origins in the late seventeenth century in this previous answer about the "cavalier hat"; it seems to have been worn by most men, although in the earlier part of the century the size of the fashionable wig meant that fashionable men were not actually wearing it. However, it did not disappear overnight in 1800.
The 1780s and 1790s are often set apart from the rest of the century because, well, they're significantly different. In literature, in politics ... and in fashion. The demise of this particular style of cocking the hat goes back to this period: in the late 1770s and 1780s, casualness, a lack of artifice, and "rural simplicity" became the watchwords of fashion in France, England, and America, and while they had a number of effects on various aspects of dress, in relation to hats, they made people more interested in styles that didn't have so much structure. This frequently meant the hat à l'Androsmane or à la Suisse, a version where only the front and back of the brim were turned up (also called a "bicorn" today), or where there was a slight point made in the front, but the overall effect was more wide than three-cornered. See the Galerie des Modes, 9e Cahier, 4e Figure (1778) and the Cabinet des Modes, 14e Cahier, 1ere Planche (1786) for examples. The French were particularly fascinated with the clothing associated with English squires and noblemen on their country estates, and so we also see the informal "jockey hat" with a smaller brim, not turned up at all; another plate refers to this as a hat à la Charbonniere, or "charcoal-burner's hat", emphasizing its casual, working-class association. And for a final example, we have the hat à la Pensilvanie, probably associated with Quakers of the period.
By the late 1780s, the precursor to the later top hat was being fashionably worn. (By men and women, incidentally, although women typically expanded the brim.) It would go on to become the most common style of fashionable hat for a number of decades and be more associated with the nineteenth century, but its origins trace back to the end of the previous.