Patrick,
When you call Close() aren't you closing the form (Form2) that
you want to return to?
If you call MessageBox.Show() with Form2 set as owner, Form2
will be reactivated when the message box closes. You don't need
to call any method to close the message box itself, it will be
automatically closed when the user clicks one of its buttons.
I might have misunderstood the problem.
- Magnus
"Patrick De Ridder" <ng****@freeler.nl> wrote in message
news:im********************************@4ax.com...
On Tue, 5 Aug 2003 14:25:38 +0100, "Alan Gilmour" <a.gilmour
no****@locland.com> wrote:
Hi,
Your description was a bit vague but can you not just use the object for
Form1 and then call
Form1.Close();
Nope.
Form2 is a form in which I enter data to be written away.
At a certain point a message box appears with Ok/Cancel.
When I press Cancel I want to return to Form 2, not to Form1.
I know how to return to Form1 (Close() will do the trick).
Any more suggestions?
--
Patrick De Ridder
ng****@freeler.nl