A common trend I see here in Gambling Discussion are people making threads complaining how they lost money, etc while playing. I bet they were not complaining while they were winning.
There's only on way to prevent gambling going out of hand and it also applies to other areas of life... Create a budget AND stick to it.
Set a monthly limit, a fund for everything entertainment-related. Use that up within a month or not, it gets topped up monthly and that's the only money you can use for gambling.
it's the nature of people - they always complain for losses but never complain while they are winning. but all you need is just to stop at right time.
Another point is that even if people win in gambling, that win is temporary as they invest all the amount again and lose it in the next game. People should know when to play and how to get and withdraw profits. If you do not withdraw your profits and keep on playing, eventually you lose all your money including the profits also.