0

In Android when finished with an Activity and want to return to previous activity you use finish();.

Is there an equivalent in WinForms using C#? In my application once the user clicks the Enter button I want the user to return to previous window.

rae1
  • 6,066
  • 4
  • 27
  • 48
Aaron
  • 4,380
  • 19
  • 85
  • 141

1 Answers1

2

Base on a superficial understanding of an Activity in Android (sounds like a window element), you just need to call Close on the current window, then the previous one will then move to the foreground.

For future reference however, I would advise you not too create such analogies between two radically different technologies since the life cycle of an Activity in Android is radically different from a form in a Windows Form application. You should try to learn the framework rather than replicating an implementation from a different framework/platform.

rae1
  • 6,066
  • 4
  • 27
  • 48
  • 1
    +1 - Better yet, [set the `DialogResult`](http://stackoverflow.com/questions/16846573/using-dialogresult-correctly) – Sayse Jun 05 '14 at 14:43