Before the TabPage can lose focus it must recieve focus. TabPages don't
usually get focus but you can set focus as follows:
TabPage1.Focus = True
However, I do not believe that this is what you want to do.
Take a look at the TabControls SelectedIndexChanged Method.
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Naighes" <(E-Mail Removed)> wrote in message
news:6A56306D-34B5-497F-B5F5-(E-Mail Removed)...
> Hi!
> In my Windows Form, I have two TabePage control (TabPage1 and TabPage2).
> I tryed to intercept the LostFocus event.
> Here is the code:
> ________________________________________
> Private Sub TabPage1_LostFocus(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles TabPage1.LostFocus
> MsgBox("GOT IT!")
> End Sub
> ________________________________________
>
> I tested my application, but no Message Box appears when I click from
> TabPage1 to TabPage2.
> I used this solutions with a lot of WindowsForms controls and it always
> worked!
> Why have I problems with this one?
>
> Thanks in advance,
> Naighes.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004