Once you have determined how much you can most likely borrow, a good strategy is to cut that amount by 10%. If you calculate that you can qualify for a monthly payment of $1,000, use $900 as your goal. This will serve two purposes. First, it will give you a little cushion if interest rates turn out to be a little higher than you anticipated. Second, you will not stretch yourself so thin that even a small, unexpected expense will cause financial difficulty.
Tell your real estate agent that you do not want to pay more than $900 per month for a fixed rate, fully amortized loan. This will be the highest payment type of loan. If you like a home that you see for that payment, you are making a sensible purchase. If you absolutely hate the homes in that payment range, you can raise your sights a little. You may still keep the $900 a month payment (at least for a while) by getting an adjustable or hybrid loan.
Once you know how much you can prequalify for, do not start shopping for a home before you understand some of the additional components common to the mortgages, the different types of loans available, and their variations. You can then calculate qualifying for the type of loan that is best for your situation.