Generally, it depends on how well the programmer has put them actual program together. As I understand it, the OS sends a signal to the program when it needs to refresh the display, and most programs use this signal. That means most programs will not bother calling their display-refresh routines if they are hidden.
Not all programs are written effectively, though.