Frame size is independent of wheel size, and you should consult the manufacturer spec's. In most cases, a 20" frame is for people over 6' tall.
Let's say that you were to put 29" wheels on a frame intended for 26" wheels, that would change the framing size enough to cause pain from the top bar were you to hop off suddenly without thinking...