N
Neil
Hello,
I have a month view control on a form with no border etc. All that is
displayed on the screen is the control. I use this as the generic date
picker for all my date textbox fields. When the user double clicks on a date
textbox, I want this form to open and the top left corner to be where the
mouse pointer is. This leaves me with two questions (the second only being
relevent if the answer is no to the first):
1) Is there an API call that can return the location of the mouse on the
screen (in VB i beleive it is as simple as Screen.x & Screen.y - VBA not so
simple!)?
2) I can use the mouse down event of the text box's to record the mouse
position when a text box is clicked and then move the Month View form to
that position. However, if i use the following for example:
Forms!frmMonthView.Move frm.WindowLeft + CurX, frm.WindowTop + CurY
frm is the form where the textbox that has been clicked is and CurX and CurY
are the XY values passed into the mose down event. There is a slight snag
here... the X and Y single values are in pixels and the Move function treats
the values as twips. Is there a function that will convert pixels to twips
already?
TIA,
Neil.
I have a month view control on a form with no border etc. All that is
displayed on the screen is the control. I use this as the generic date
picker for all my date textbox fields. When the user double clicks on a date
textbox, I want this form to open and the top left corner to be where the
mouse pointer is. This leaves me with two questions (the second only being
relevent if the answer is no to the first):
1) Is there an API call that can return the location of the mouse on the
screen (in VB i beleive it is as simple as Screen.x & Screen.y - VBA not so
simple!)?
2) I can use the mouse down event of the text box's to record the mouse
position when a text box is clicked and then move the Month View form to
that position. However, if i use the following for example:
Forms!frmMonthView.Move frm.WindowLeft + CurX, frm.WindowTop + CurY
frm is the form where the textbox that has been clicked is and CurX and CurY
are the XY values passed into the mose down event. There is a slight snag
here... the X and Y single values are in pixels and the Move function treats
the values as twips. Is there a function that will convert pixels to twips
already?
TIA,
Neil.