For pan frying you probably want to start with a firm tofu. It's a good idea to press the tofu to remove excess water: wrap the tofu in a cloth and place it between two cutting boards, weighting the top cutting board with a heavy book or other similar object. Wait at least twenty minutes (you can prepare the rest of the vegetables/onions for the stir fry at this point.
Once the tofu has been pressed, cut it into the desired pieces. It's a good idea to fry it at medium-high heat in only oil first, then add sauces (soy sauce, vinegar, whatever) only after the tofu begins to brown slightly.
Note: the above won't simulate deep-fried tofu. For deep fried tofu, you may want to use a softer tofu, still press it before using, and coat the cubes in corn starch before frying. Of course you probably know you can deep-fry at home with just a large pot of oil.
For a different texture you can freeze the tofu before frying.
Although not fried, I would also recommend that you try baked (marinaded) tofu to see if you like that texture/flavor better. You would still want to press the tofu, then slice it rather thinly. You can reapply the marinade during baking for more flavor.