These sentences all mean the same thing, and they use different constructions for same act of being told:
(1) Being told that you are becoming a mother while you are at your husband's birthday party would be a great thing.
(2) It would be a great thing if somebody tells you at your husband's birthday party that you are becoming a mother.
(3) It would be great to be told at your husband's birthday party that you are becoming a mother.
(4) It would be great were someone to tell you at your husband's birthday party that you are becoming a mother.
(5) It would be great if someone would tell you at your husband's birthday party that you are becoming a mother.
If you think knowing the terminology for these would be useful, read on: (1) uses a gerund and the passive voice, (2) uses the active voice and the present tense (within an if clause), (3) uses a passive infinitive, (4) uses the active voice, the subjunctive mood in the past tense (though this is debatable), and an infinitive, and (5) uses the conditional mood.