If your cucumbers and tomatoes are not setting fruit, it may be because there is not enough pollination. Bees usually do this, but you can do it yourself. Female flowers have the fruit behind them. Male flowers do not. Take a small paintbrush or Q-tip and swab it inside the male flower. Then transfer the pollen to the inside of the female flower.
The female flower I am showing has a cucumber growing. Your female flower may have a smaller fruit. I am also posting a male flower.