Solved

Validating event and sticky forms

Posted on 2006-07-12
1
206 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now