By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,260 Members | 1,344 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,260 IT Pros & Developers. It's quick & easy.

Return to the object that you came from.

P: n/a
All.

I would like to return to the object I left immediatly prior to moving
to the exit button, should the user choose not to confirm his/her
exit.

Is this possible, if so how?

Rob.B
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Rob,

This is from the top of my head... and there can be better solutions - but
here is one.

Take a form level member variable of type control
Private m_LastSelectedCtrl As Control

Then in each textboxes or whatever controls you want the focus to transfer
to in there Leave event make it last selected ctrl
like in Button1_Leave
m_LastSelectedCtrl = Button1

Then finally incase user doesnt want to exit check for the last selected
control and if any select it
If Not m_LastSelectedCtrl Is Nothing Then m_LastSelectedCtrl.Select()

HTH
rawCoder

"Rob Bradford" <ro**********@lvirgin.net> wrote in message
news:9a********************************@4ax.com...
All.

I would like to return to the object I left immediatly prior to moving
to the exit button, should the user choose not to confirm his/her
exit.

Is this possible, if so how?

Rob.B

Nov 21 '05 #2

P: n/a
Thanks to everyone who replied, although it took a while for me to get
my head around some of it, found it all to be a great help.

On Sat, 25 Sep 2004 08:34:49 +0000 (UTC), Rob Bradford
<ro**********@lvirgin.net> wrote:
All.

I would like to return to the object I left immediatly prior to moving
to the exit button, should the user choose not to confirm his/her
exit.

Is this possible, if so how?

Rob.B


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.