Welcome to FT! ^
We're all a bit confused in the beginning
Some clarifications:
1) Each star alliance (*A) airline has its own frequent flyer (FF) program. You choose one program and credit all your flights there. Each program has different accrual and redemption rules, they are not interchangeable, and there is no such thing as "*A points", but rather United points, Us Airways points, etc.
2) As a general rule within *A, whether you get miles and how many miles you get is decided by the airline
operating the flight,
codeshares don't matter.
I realize you booked ANA to get miles, but during the booking process codeshares are always displayed. You could have, at that point, made sure that all your flights were actually operated by ANA and not Virgin.
Unfortunately United and Virgin are not partners, so you can't get United miles if flying on a Virgin airplane. Sorry
3) Continental and United are in the process of merging. So far they operate separate FF programs, but at some point (likely at the end of the year) they will be combined.
Why does that help you? Because Continental and Virgin
are partners. So you can credit miles from a Virgin flight to Continental.
Then at some point your Continental and United mileage balances will be merged.
Unfortunately this won't help you with your travel plans for May.
4) Usually codeshares are not an impediment for online check-in. But you need to get the reservation code for the airline operating your flight. You can do this for example by calling said airline (Virgin in this case) and providing your name and date of travel.