Of course you can. If you know you will hang if you come armed you don't come armed when commiting crime. Perhaps more to the point you won't come armed knowing your criminal confreres know this too, and you won't even get the benefit of a trial; you'll just be shivved where you stand.
Indeed you cannot. Nor can you regulate the actions of criminals via laws but only punish them
Of course you can. If you know you will hang if you come armed you don't come armed when commiting crime. Perhaps more to the point you won't come armed knowing your criminal confreres know this too, and you won't even get the benefit of a trial; you'll just be shivved where you stand.