He was also a delegate to the Continental Congress from Maryland , and the third United States Secretary of War from January 27 , 1796 to May 13,1800 , under Presidents George Washington and John Adams . He was a delegate to the Continental Congress from Maryland , and the third United States Secretary of War ( 1796 â `` 1800 ) , under presidents George Washington and John Adams .