Report question

Question: C#: How do you send OK or Cancel return messages of dialogs when not using buttons?