Re: System.Windows.Forms.TabPage: handle LostFocus event

Discussion in 'Microsoft VB .NET' started by Mick Doherty, Sep 10, 2004.

  1. Mick Doherty

    Mick Doherty Guest

    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" <> wrote in message
    news:...
    > 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
     
    Mick Doherty, Sep 10, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Özden Irmak
    Replies:
    4
    Views:
    172
    Özden Irmak
    Dec 22, 2003
  2. Bernard Bourée

    TextBox LostFocus Event

    Bernard Bourée, Oct 23, 2004, in forum: Microsoft VB .NET
    Replies:
    4
    Views:
    576
    Bernard Bourée
    Oct 24, 2004
  3. Sam

    issue with datagrid lostfocus event

    Sam, Oct 10, 2005, in forum: Microsoft VB .NET
    Replies:
    2
    Views:
    345
  4. Replies:
    14
    Views:
    3,722
    Jay B. Harlow [MVP - Outlook]
    Aug 10, 2006
  5. Urs

    Lostfocus event handler

    Urs, Feb 19, 2007, in forum: Microsoft VB .NET
    Replies:
    0
    Views:
    257
Loading...

Share This Page