I've often confused these two terms, and I'm sure other folks have too. Tinhorn originally referred to gamblers, usually in the Old American (US) West, who were pretentious braggarts but who were unskilled and ineffective. And sometimes, it seems to me, the term was used to imply a new or naive gambler, especially in some of the old Hollywood Westerns, so this could be the cause for the two words being used interchangeably in some quarters. This is from American Heritage:

SYLLABICATION: tin·horn
PRONUNCIATION: tnhôrn
NOUN: Slang A petty braggart who pretends to be rich and important.
ETYMOLOGY: From the horn-shaped metal can used by chuck-a-luck operators for shaking the dice.
OTHER FORMS: tinhorn —ADJECTIVE


And here's a great discussion on the origins of tinhorn and greenhorn, and how they may have acquired a shared meaning, from Quinion:

http://www.quinion.com/words/qa/qa-tin2.htm