Jump to content

["Resolvido"] Quando se clica fora de um form...


PCerqueira
 Share

Recommended Posts

Bom dia a todos.

Eu tenho uma dúvida que é: Eu gostava de saber se é possível executar uma acção quando se clica fora de um form, ou seja:

Um form é chamado, (BringToFront) e eu quero que quando se clique fora desse, execute uma acção qualquer.

É possível?

Cumps  👍

Link to comment
Share on other sites

    Private Sub Form1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.GotFocus
        ' Quando é activado..
    End Sub
    Private Sub Form1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LostFocus
        ' Quando é desactivado..
    End Sub[/Code]

Compr.

Making the impossible possible and pwing the world on db at a time.

Link to comment
Share on other sites

Quando clicas fora de um form, acontece outra coisa mas apenas uma vez.

O form perde foco.

Quando o form perde foco, é disparado o evento "LostFocus".

Será que serve para o que queres fazer?

EDIT: ;D timing.

Sérgio Ribeiro


"Great coders aren't born. They're compiled and released"
"Expert coders do not need a keyboard. They just throw magnets at the RAM chips"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.