Your wife can change to F1 by contacting her school and getting I-20. Once she changes to F1, she can stay on F1 as long as it takes no matter what happens to your H1B. However, if she finds a job and change to H1B, assuming you won't get your green card by then, her H4 years will count as her...