473,395 Members | 1,969 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,395 software developers and data experts.

Page hit

How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
Nov 18 '05 #1
14 1424
Ruca,

Look at System.Drawing.Point
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdrawingpointclasstopic.asp

And

Control.PointToScreen method
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformscontrolclasspointtoscreento pic.asp

HTH,

Raymond Lewallen

"ruca" <ru***@iol.pt> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Nov 18 '05 #2
Ruca,

Look at System.Drawing.Point
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdrawingpointclasstopic.asp

And

Control.PointToScreen method
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformscontrolclasspointtoscreento pic.asp

HTH,

Raymond Lewallen

"ruca" <ru***@iol.pt> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Nov 18 '05 #3
you can handle it in the event such as click or doubleclick (depending on if
its availiable).

you can hittest.

you can use the API.
"ruca" <ru***@iol.pt> wrote in message
news:ea****************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Nov 18 '05 #4
you can handle it in the event such as click or doubleclick (depending on if
its availiable).

you can hittest.

you can use the API.
"ruca" <ru***@iol.pt> wrote in message
news:ea****************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Nov 18 '05 #5
Cor
Hi Ruca,

Are you using fixed webpages.

I do not believe that this is standard possible with HTML pages. Maybe you
can use the area map for this or something.

(I type this more to show the others you are using ASPX)

:-)

Cor
Nov 18 '05 #6
Cor
Hi Ruca,

Are you using fixed webpages.

I do not believe that this is standard possible with HTML pages. Maybe you
can use the area map for this or something.

(I type this more to show the others you are using ASPX)

:-)

Cor
Nov 18 '05 #7
Ruca,

Wasn't paying attention :) I don't believe the Drawing namespace of
Control.PointToScreen method will work for you in a web based solution..
only in windows forms solutions.

Sorry for trying to confuse you :)

Raymond Lewallen

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:um**************@TK2MSFTNGP11.phx.gbl...
Ruca,

Look at System.Drawing.Point
http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfsystemdrawingpointclasstopic.asp

And

Control.PointToScreen method
http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfsystemwindowsformscontrolclasspointtoscreento pic.asp

HTH,

Raymond Lewallen

"ruca" <ru***@iol.pt> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


Nov 18 '05 #8
Ruca,

Wasn't paying attention :) I don't believe the Drawing namespace of
Control.PointToScreen method will work for you in a web based solution..
only in windows forms solutions.

Sorry for trying to confuse you :)

Raymond Lewallen

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:um**************@TK2MSFTNGP11.phx.gbl...
Ruca,

Look at System.Drawing.Point
http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfsystemdrawingpointclasstopic.asp

And

Control.PointToScreen method
http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfsystemwindowsformscontrolclasspointtoscreento pic.asp

HTH,

Raymond Lewallen

"ruca" <ru***@iol.pt> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


Nov 18 '05 #9
try these routines, they are pretty accurate:

function findPosY(obj){
var curtop = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curtop += obj.offsetTop;
if (typeof(obj.scrollTop) == 'number')
curtop -= obj.scrollTop;
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}

function findPosX(obj) {
var curleft = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}

-- bruce (sqlwork.com)

"ruca" <ru***@iol.pt> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Nov 18 '05 #10
try these routines, they are pretty accurate:

function findPosY(obj){
var curtop = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curtop += obj.offsetTop;
if (typeof(obj.scrollTop) == 'number')
curtop -= obj.scrollTop;
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}

function findPosX(obj) {
var curleft = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}

-- bruce (sqlwork.com)

"ruca" <ru***@iol.pt> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Nov 18 '05 #11
Where should I call them?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca.

"bruce barker" <no***********@safeco.com> escreveu na mensagem
news:%2****************@TK2MSFTNGP12.phx.gbl...
try these routines, they are pretty accurate:

function findPosY(obj){
var curtop = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curtop += obj.offsetTop;
if (typeof(obj.scrollTop) == 'number')
curtop -= obj.scrollTop;
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}

function findPosX(obj) {
var curleft = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}

-- bruce (sqlwork.com)

"ruca" <ru***@iol.pt> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


Nov 18 '05 #12
Where should I call them?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca.

"bruce barker" <no***********@safeco.com> escreveu na mensagem
news:%2****************@TK2MSFTNGP12.phx.gbl...
try these routines, they are pretty accurate:

function findPosY(obj){
var curtop = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curtop += obj.offsetTop;
if (typeof(obj.scrollTop) == 'number')
curtop -= obj.scrollTop;
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}

function findPosX(obj) {
var curleft = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}

-- bruce (sqlwork.com)

"ruca" <ru***@iol.pt> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


Nov 18 '05 #13
in client code. if you the x & y on the server, then you want to use an
image map

-- bruce (sqlwork.com)

"ruca" <ru***@iol.pt> wrote in message
news:ej*************@TK2MSFTNGP11.phx.gbl...
Where should I call them?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca.

"bruce barker" <no***********@safeco.com> escreveu na mensagem
news:%2****************@TK2MSFTNGP12.phx.gbl...
try these routines, they are pretty accurate:

function findPosY(obj){
var curtop = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curtop += obj.offsetTop;
if (typeof(obj.scrollTop) == 'number')
curtop -= obj.scrollTop;
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}

function findPosX(obj) {
var curleft = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}

-- bruce (sqlwork.com)

"ruca" <ru***@iol.pt> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca



Nov 18 '05 #14
in client code. if you the x & y on the server, then you want to use an
image map

-- bruce (sqlwork.com)

"ruca" <ru***@iol.pt> wrote in message
news:ej*************@TK2MSFTNGP11.phx.gbl...
Where should I call them?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca.

"bruce barker" <no***********@safeco.com> escreveu na mensagem
news:%2****************@TK2MSFTNGP12.phx.gbl...
try these routines, they are pretty accurate:

function findPosY(obj){
var curtop = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curtop += obj.offsetTop;
if (typeof(obj.scrollTop) == 'number')
curtop -= obj.scrollTop;
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}

function findPosX(obj) {
var curleft = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}

-- bruce (sqlwork.com)

"ruca" <ru***@iol.pt> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
How can I get the coordinates of where I click with the mouse?
It is possible to know?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca



Nov 18 '05 #15

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

Similar topics

1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
0
by: Nathan | last post by:
Hi, I seem to having a peculiar problem with the display of odd and even pages in XSL-FO. Here is a small background of the problem. My xsl stylesheet mentions my fo:layout-master-set as ...
2
by: James | last post by:
I've been to websites where if I navigate off a form, trying to get back to it by hitting the back button gives me a page which says "Warning, page has expired". It doesn't display the page. I've...
4
by: Kevin Phifer | last post by:
Ok, before anyone freaks out, I have a solution I need to create that gathers content from maybe different places. Each one can return a <form> in the html, so its the classic can't have more than...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
6
by: MooreSmnith | last post by:
When I navigate to the next page using Response.Rediect("MyNextPage.aspx") current page Page_Load event is called. What I may wrongly understood is that post back will happen whenever there is any...
1
by: Lenard Gunda | last post by:
Hi! I have the following problem. From my main page, when someone clicks a button, it uses client side javascript to open another .aspx page. This page displays content, based on what the...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
8
by: Ed Jay | last post by:
I want to use history.go() to navigate between my previously loaded pages. I'm looking for a way to trigger a function call when a page is accessed using history.go(). Is there an event generated?...
3
by: Mesut | last post by:
I have written a form in with radio buttons the name is set to orderby and the value is set to KundeVorName and the next value is KundeNachName and it goes so on. I wanna modify my query according...
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:
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.