You can get a Supreme Court decision affirming your rights, but as this story: http://www.washingtontimes.com/blog/guns/2011/nov/7/miller-washingtons-unsafe-gun-safety-class/ demonstrates, that's just the first step toward exercising them. Washington Times editor Emily Miller is going through the process of getting a legal handgun in the city, and one of the requirements is taking a city-approved safety class. Since the classes can't be given in the city, she embarks on a confusing search for a certified instructor, not helped a bit by the city's police establishment, which clearly is going for governance as imagined by Kafka.
I was working at the NRA when D.C. banned handguns in 1976, and the association complained that the law would prevent the American Rifleman from fulfilling its customary role as consumer watchdog of the gun world. Obligingly, the D.C. government created a new occupational category called "licensed firearms tester." If you were one, you could transport guns in and out of the District, which I did, quite often, on the bus and Metro subway system.
The only bad part of it was going down to D.C. Police Headquarters for fingerprinting. My advice is, don't get arrested in D.C. The whole licensed tester thing became moot when we moved our operation to Virginia in 1987, but somewhere I still have my licensed tester card.