473,795 Members | 2,498 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I fetch current cursor position

Hello!

Assume I catch a double click in a form by using the event handler that
forms designer create for me.

Now to my question when I double click in the form the event handler is
trigged but when I'm in this event handler I want to find out the cursor
position(x,y cordinates) where the double click occurred how is that done?

//Tony
May 23 '06 #1
2 5781
you can capture mouse coordinates from argument on events MouseDown and
MouseUp

you can capture these events and hold position in private member and
use it later in MouseDoubleclic k event handler if you need it there

hope this helps
Galin Iliev[MCSD.NET]
www.galcho.com

May 23 '06 #2
Cursor.Position

//Relative to Screen
this.PointToScr een(Cursor.Posi tion);

//Relative to Client
this.PointToCli ent(Cursor.Posi tion);

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"tony" <jo************ *****@telia.com > wrote in message
news:Ol******** ******@TK2MSFTN GP04.phx.gbl...
Hello!

Assume I catch a double click in a form by using the event handler that
forms designer create for me.

Now to my question when I double click in the form the event handler is
trigged but when I'm in this event handler I want to find out the cursor
position(x,y cordinates) where the double click occurred how is that done?

//Tony

May 23 '06 #3

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

Similar topics

1
4891
by: Ann | last post by:
Hello everyone, hope someone can help me with this. I have a SQL stored procedure that inserts a record into a table, creates a cursor to fetch the last record that was added to get the unique key that was created and then writes that and other info to a separate table. This procedure was working fine at our ISP under NT 4 and SQL 7. We recently moved to another ISP on servers that are windows 2000 and SQL 2000. Now this code is...
1
2944
by: M Wells | last post by:
Hi All, I've been checking the online javascript libraries for code that will show me how to insert characters at the current cursor point in a textarea form field to help me markup content I write for my site. Unfortunately, all I've been able to locate are plugin applets that give wysiwig functionality, which is not what I'm looking for. So I'm wondering if someone can provide some code, or point me to some
1
10120
by: Dave Hammond | last post by:
I have an html element (a link) with an onclick handler which opens a popup window, and would like to position that window at the coordinates where the element appears on the page. I have installed a document.onclick event handler which saves the eventX and eventY values, then use those values to set the window top/left coordinates. The problem is that the eventX and eventY values always seem to be the previous coordinates, not the...
1
3682
by: Paul Steele | last post by:
Is there any way in C#/.NET to determine what the current global cursor is being displayed? The .Net method Cursor.Current only applies to the running application. I want to access the cursor even when my program is not in control. I've done some reading and the best I've come across is the Windows API call GetCursorInfo. This returns a struct that has some useful info such as cursor position, but I don't see any way to determine from the...
9
11089
by: Acupuncture | last post by:
Hi, I am developing a JDBC application and I encountered this problem (DB2 for ISeries). I want to do a select for update and also use the fetch first rows clause. This is my sql statement: SELECT UsrNbr, UsrPwd, UsrPwdChgD, UsrEmail, UsrChgUsrI, UsrChgDte FROM USERS WHERE UsrNbr = ? FETCH FIRST 1 ROWS ONLY FOR UPDATE This runs fine (the cursor gets this name 'P00022'), but when I execute the
10
13238
by: scoonie999 | last post by:
I'm having a problem that I can't seem to find any solution for online. I'm using a cursor in a cobol program to fetch some data. I know for a fact that the select should return 2 rows. The fetch works as I would expect it to on the 2 rows, but then when I do my next fetch, the program ends abnormally. My next step is to check for sqlcode 100, as I would expect it to be, but my program never even gets to this step.
3
4208
by: Doug | last post by:
Hi I am trying to find a way to make the mouse cursor move to the keyboard cursor position in an application. For example, I use an application called Enterprise Guide, and I control this application using Dragon naturally speaking as I have a disability that makes using the keyboard quite difficult. I often have to say the name of an object to make to be the active or highlighted object. However to do something such as drag and drop...
7
6836
by: Frank Swarbrick | last post by:
Is there a way to do a multi-row fetch in to a COBOL table with DB2/LUW? Apparently the following is supported in z/OS, but not LUW (or at least I couldn't get it to work): WORKING-STORAGE SECTION. EXEC SQL INCLUDE SQLCA END-EXEC EXEC SQL BEGIN DECLARE SECTION
3
27524
Soniad
by: Soniad | last post by:
Hello, In stored procedure, i am using query that fetches 2 columns record but single row. i have used cursor to fetch single record. is there any way to fetch the record and put it in variable declared without using cursor , or any syntax . As cursor is better to fetch multiple records, but here record fetched is single row record, but the problem i am facing is how to put this value in variable. if there was a single column then it is...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10163
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.