<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Bericht</TITLE>
<META content="MSHTML 5.50.4916.2300" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=983373413-19092003>You
need to use the GetCursorPos API call:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=983373413-19092003></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Private Type POINTAPI<BR><SPAN
class=983373413-19092003> </SPAN>x As
Long<BR> y As Long<BR>End Type<BR></FONT></DIV>
<DIV><FONT face="Courier New" size=2>Private Declare Function GetCursorPos Lib
"user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><SPAN class=983373413-19092003><FONT face="Courier New" size=2>Dim typPA AS
POINTAPI</FONT></SPAN></DIV>
<DIV><SPAN class=983373413-19092003><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=983373413-19092003><FONT face="Courier New" size=2>GetCursorPos
typPA</FONT></SPAN></DIV>
<DIV><SPAN class=983373413-19092003><FONT face="Courier New" size=2>Debug.Print
typPA.x, typPA.y</FONT></SPAN></DIV>
<DIV><SPAN class=983373413-19092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=983373413-19092003><FONT face=Arial color=#0000ff size=2>The
results are in pixels, so to convert to twips you need to use the GetDeviceCaps
API call:</FONT></SPAN></DIV>
<DIV><SPAN class=983373413-19092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=983373413-19092003><SPAN class=983373413-19092003><FONT
face="Courier New" size=2>Private Const cTwipsPerInch = 1440<BR>Private Const
LOGPIXELSX = 88 ' Logical
pixels/inch in X<BR>Private Const LOGPIXELSY =
90 ' Logical pixels/inch in
Y</FONT></SPAN></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=983373413-19092003><SPAN class=983373413-19092003><FONT
face="Courier New" size=2>Private Declare Function GetDC Lib "user32"
(ByVal hwnd As Long) As Long<BR>Private Declare Function GetDeviceCaps Lib
"gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As
Long</FONT></SPAN></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=983373413-19092003><SPAN class=983373413-19092003><FONT
face="Courier New" size=2>Public Function XPixelsToTwips(ByVal lngX As Long) As
Long</FONT></SPAN></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=983373413-19092003><SPAN class=983373413-19092003><FONT
face="Courier New" size=2> XPixelsToTwips = lngX *
(cTwipsPerInch / GetDeviceCaps(GetDC(0), LOGPIXELSX))</FONT></SPAN></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=983373413-19092003><SPAN class=983373413-19092003><FONT
face="Courier New" size=2>End Function</FONT></SPAN></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=983373413-19092003><SPAN class=983373413-19092003><FONT
face="Courier New" size=2>Public Function YPixelsToTwips(ByVal lngY As Long) As
Long</FONT></SPAN></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=983373413-19092003><SPAN class=983373413-19092003><FONT
face="Courier New" size=2> YPixelsToTwips = lngY *
(cTwipsPerInch / GetDeviceCaps(GetDC(0), LOGPIXELSY))</FONT></SPAN></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=983373413-19092003><SPAN class=983373413-19092003><FONT
face="Courier New" size=2>End Function</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=983373413-19092003><SPAN class=983373413-19092003><FONT
face="Courier New" size=2></FONT></SPAN></SPAN> </DIV>
<DIV><FONT face=Arial><BR><FONT color=#0000ff size=2></FONT></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Erwin Craps
[mailto:Erwin.Craps@ithelps.be]<BR><B>Sent:</B> Friday, September 19, 2003
7:58 AM<BR><B>To:</B> Access Developers discussion and problem
solving<BR><B>Subject:</B> [AccessD] Screen position of
mouse.<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=855475312-19092003>I can't find how
to know the postition of the mouse on the screen.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=855475312-19092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=855475312-19092003>I have a pop-up
form I want to pop-up at the same place as where the mouse cursor is at that
time.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=855475312-19092003>So I want to put
put the code in the on_open event of the pop-up form in
question</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=855475312-19092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=855475312-19092003>lngMouseLeft =
???.Left</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=855475312-19092003>lngMouseTop =
???.Top</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=855475312-19092003></SPAN></FONT><FONT face=Arial size=2><SPAN
class=855475312-19092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=855475312-19092003>me.move
lngMouseLeft, lngMouseTop</SPAN></FONT></DIV>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align=left><FONT face=Arial
size=2></FONT> </P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align=left><SPAN
class=855475312-19092003><FONT face=Arial size=2>Thx </FONT></SPAN></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align=left><FONT face=Arial
size=2></FONT> </P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align=left><FONT face=Arial
size=2></FONT> </P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana>Erwin
Craps</FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana>Zaakvoerder
</FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana size=1><A
href="http://www.ithelps.be/jonathan">www.ithelps.be/jonathan</A></FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Arial color=#0000ff
size=2></FONT> </P><FONT face=Verdana></FONT>
<TABLE id=AutoNumber1 style="BORDER-COLLAPSE: collapse" borderColor=#111111
width="100%" border=1>
<TBODY>
<TR>
<TD width="100%"><FONT face=Verdana size=1>
<P align=center>This E-mail is confidential, may be legally privileged,
and is for the intended recipient only. Access, disclosure, copying,
distribution, or reliance on any of it by anyone else is prohibited and
may be a criminal offence. Please delete if obtained in error and E-mail
confirmation to the sender.</FONT></P></TD></TR></TBODY></TABLE>
<DIV align=center>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 3px"><B><FONT face=Verdana
color=#000080>IT Helps - I.T. Help Center </FONT></B><FONT face=Symbol
color=#000080 size=2> · <FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT>
</FONT><B><FONT face=Verdana color=#000080> B</FONT></B><FONT
face=Verdana color=#000080><B>ox Office Belgium &
Luxembourg</B></FONT></P>
<P style="MARGIN-TOP: 1px; MARGIN-BOTTOM: 1px"><FONT face=Verdana
color=#808080 size=2><A href="http://www.ithelps.be/"
eudora="autourl">www.ithelps.be</A> </FONT><FONT face=Symbol
color=#808080 size=2>·<FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT> </FONT><FONT
size=2><FONT face=Verdana color=#808080> <A
href="http://www.boxoffice.be/">www.boxoffice.be</A> </FONT><FONT
face=Symbol color=#808080>·<FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT>
</FONT></FONT><FONT face=Verdana color=#808080><FONT size=2> </FONT><A
href="http://www.stadleuven.be/"><FONT
size=2>www.stadleuven.be</FONT></A></FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana
color=#808080 size=1>IT Helps bvba</FONT><FONT face=Symbol color=#808080
size=1> <FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT> · <FONT
face="Courier New"></FONT><FONT FACE="Courier New"></FONT> </FONT><FONT size=1><FONT face=Verdana
color=#808080>Mercatorpad 3 </FONT><FONT face=Symbol
color=#808080> ·</FONT></FONT><FONT face=Verdana color=#808080
size=1> 3000 Leuven</FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana
color=#808080 size=1>IT Helps </FONT><FONT face=Symbol color=#808080
size=1>·</FONT><FONT face=Verdana color=#808080 size=1> Phone: +32 16
296 404 </FONT><FONT face=Symbol color=#808080 size=1>·<FONT
face="Courier New"></FONT><FONT FACE="Courier New"></FONT> </FONT><FONT face=Verdana color=#808080
size=1> Fax: +32 16 296 405 E-mail: <A
href="mailto:Info@ithelps.be">Info@ithelps.be</A> </FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana
color=#808080 size=1>Box Office </FONT><FONT face=Symbol color=#808080
size=1> ·<FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT> </FONT><FONT face=Verdana
color=#808080 size=1> Fax: +32 16 296 406 </FONT><FONT face=Symbol
color=#808080 size=1> ·<FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT> </FONT><FONT
face=Verdana color=#808080><FONT size=1> Box Office E-mail: </FONT><A
href="mailto:figures@boxoffice.be"><FONT
size=1>Staff@boxoffice.be</FONT></A></FONT></P></DIV>
<DIV> </DIV></BLOCKQUOTE><br><br>--------------------------------------------------------------------------------------------------------------------<br>This email and any files transmitted with it are confidential and<br>intended solely for the use of the individual or entity to whom<br>they are addressed.<br>If you have received this email in error please notify the<br>originator of the message. This footer also confirms that this<br>email message has been scanned for the presence of computer viruses.<br><br>Any views expressed in this message are those of the individual<br>sender, except where the sender specifies and with authority,<br>states them to be the views of Tappe Construction Co.<br><br>Scanning of this message and addition of this footer is performed<br>by SurfControl E-mail Filter software in conjunction with <br>virus detection software.<br></BODY></HTML>