How to be entitled
To be entitled for any of the above, you need to purchase the shares one trading day before the ex-Date. You will not be entitled for the above if you purchase the shares on ex-Date.
On ex-Date, the price will be adjusted to reflect the theoretical market price of the stock after the entitlement. You can sell the shares on / after ex-Date and still be entitled to the corporate exercise. The key is to purchase the shares before ex-Date.