Avatar of carloselfaite
carloselfaite

asked on 

vb detect mouse click

Hi, I neew to detect when user click outside my form.
I am using visualstudio 2015 vb.net
Visual Basic.NET.NET Programming

Avatar of undefined
Last Comment
carloselfaite
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Maybe the Form's Deactivate event (https://msdn.microsoft.com/en-us/library/system.windows.forms.form.deactivate(v=vs.110).aspx) is what you are looking for?

What are you trying to achieve?
It can be done but it means writing a routine that delves deep into the operating system.  Windows Forms are not designed to detect clicks outside of their space. It might be easier to check for focus changes
ASKER CERTIFIED SOLUTION
Avatar of Brad Brett
Brad Brett
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of carloselfaite
carloselfaite

ASKER

perfect
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo