Your food is what causes the gas, so check your diet for gas-producing foods, and avoid them most of the time.
When you are running, you are using your efforts toward the running process, and, in addition to that, your digestion is being "helped along" by the exercise, so any gas in your system is moving along with great speed. It would be more difficult to suppress gas while running, as you can guess.
Some people do fart more than others, too, and that's a fact. If it is a real embarrassment, and you want to reduce the chance that you will pass much gas, do not eat for hours before running on the treadmill.
Reward yourself with a meal afterward--you will be surprised that your appetite will be smaller, and you will be full sooner.