Kiawe's source is correct. I just checked Diamond (Gen 4) and Ruby (Gen 3) on GBA & DS emulators. It isn't possible until Black/White.
The form difference section will now show Shiny Pokémon as well as
form differences. The last sprite selected will become the one
displayed in the main entry.
List (Main Series)
Black 2/White 2
Omega Ruby/Alpha Sapphire
Ultra Sun/Ultra Moon
Let's Go, Eevee!/Let's Go, Pikachu!
Brilliant DIamond/Shining Pearl