473,388 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Right click window - how to close it

Hi all,

I've made a control, and when a user right clicks it, it launches a
form with some options. I want this form to behave like typical "right
click" windows do - it should close when the user clicks a location
not on the form. The trouble is that I can only pick up clicks that
occur ON the form, so I'm at a loss as how to close it.

Any ideas?

thanks,
HC
Oct 3 '08 #1
1 1224
<He*************@googlemail.comwrote in message
news:1b**********************************@p49g2000 hsd.googlegroups.com...
I've made a control, and when a user right clicks it, it launches a
form with some options. I want this form to behave like typical "right
click" windows do - it should close when the user clicks a location
not on the form. The trouble is that I can only pick up clicks that
occur ON the form, so I'm at a loss as how to close it.

Any ideas?

You can use the Deactivate event of the form. which occurs when the form
loses focus and is no longer the active form. This will hapen if the user
clicks outside of the form.

Oct 4 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: George Hester | last post by:
In a page I have when the user left-clicks the page a Input box for a form gets the focus. But if the user right-clicks the page the Input box is not getting the focus. I'd like the Input box to...
9
by: Dennis Allen | last post by:
Hi. What's the best way to display an image, disabling the user's ability to right-click on it? I believe you have to use <body oncontextmenu="return false">. Would the following work? var...
29
by: lori3laz | last post by:
How do you disable the right click>view source option on web pages so people can't view your coding and copy it? What's the html I need to include in my website to utilize this feature? Thank...
6
by: Scotty | last post by:
What function is called in response to a click on "Close" on system menu (the "X" in the top right side of window)?
15
by: Oleg Subachev | last post by:
I need to programmatically invoke from other class Click event of the Button on my Form. Button.OnClick method is protected, not public. How to perform this ? Oleg Subachev
2
by: Tarakeshwar Reddy | last post by:
I am using javascript to open a popup window on a ImageButton click. My Page_Load contains this code btnNew.Attributes.Add("onclick","popNew()"); this is my javascript function popNew() {...
2
by: Nageshwarrao | last post by:
Hi All, I have a window.open() popup.In which I placed an "Close" button.when I Click on that "Close" button it will pass some information to the Database and after that the window will...
1
by: Henri.Chinasque | last post by:
Hi all, I've created a control, that when a user right clicks it, it will launch a form with some options. I would like this form to have typical "right click window" behaviour - when the user...
2
by: holmes86 | last post by:
hi,everyone I have a GTK window,when click "close window" ,I want to show a verify dialog that whether verify really quit or not.so I used a MesssageDialog for verify quit.But when I clicked the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.