473,324 Members | 2,313 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,324 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 1421
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.