Solved

Validating event and sticky forms

Posted on 2006-07-12
1
208 Views
Last Modified: 2011-09-20
Hi,

After the validating of a textbox fires (cancel = true), if users want to quit the form by click the close, it would not go away because of the validating event also cancels the close operation.

I have heard of a workaround, but I need your help on how to implement it.

I want to check the mouse click area within the validating event, if it is in the form’s client area, then normal cancel will happen, otherwise, do not set cancel to true.


0
Comment
Question by:ommer
1 Comment
 
LVL 14

Accepted Solution

by:
ptakja earned 125 total points
ID: 17095265
This code is for VS 2005...

In the Validating event of the textbox you can get at the mouse coordinates like:

Me.MousePosition.X
Me.MousePosition.Y

So you could use these values to compare against the form's boundaries, etc...
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question