Re: Will Stephan Lebans answer questions about his Calendar 'control'?
- From: "DFS" <nospam@xxxxxxxx>
- Date: Thu, 6 Oct 2005 00:25:26 -0400
Stephen Lebans wrote:
> No problem.
> Open the clsMonthCal module
> Goto the Redraw method
> Scroll Down till you hit the code below
> Copy and paste the last three lines only over the existing code. This
> is the call to apiSetWindowPos.
>
> I simply changed the starting X position for the Window to be equal
> to the current X Mouse Position minus the width of the window divided
> by 2.
Works like a champ.
If you're still taking requests, I have two more (if not, no problem).
I've gone through the code, but can't figure it out:
* I want to change the title from 'Month Calendar' to Start Date or End
Date. I only found two references that set the window title in your code
(the IsCalendar and Terminate functions), and I set them both to 'Start
Date' but the popup still said 'Month Calendar'
* I might like to open the calendar as a pop-up window, rather than as modal
Thanks much, Stephen
> If m_PositionAtCursor Then
> ' Position Window at Cursor Location when
> ' Calendar was created.
> '
>
> ' Also add an option to position cursor itself in middle of
> calendar window
> ' May 05 - update m_cursorXinitpos and m_cursorYinitpos to reflect
> current cursor location when this calendar is opened
> ' This is done in the modCalendar module when the parent window
> for the Calendar is created.
>
> 'June 7, 2003 fixing position at cursor logic
> ' PositionAtCursor = True
>
> ' First check to ensure entire calendar window will fit.
> ' If not MAKE IT!
> ' COMING IN NEXT RELEASE!
> ' halfway - ((rc3.Right - rc3.Left) / 2)
>
> With udtRECT
> Call apiSetWindowPos(m_Hwnd, 0&, m_cursorX - ((rc3.Right -
> rc3.Left) / 2), m_cursorY, rc3.Right - rc3.Left, _
> rc3.Bottom - rc3.Top, 0&)
> End With
>
>
> HTH
> Stephen Lebans
> http://www.lebans.com
> Access Code, Tips and Tricks
> Please respond only to the newsgroups so everyone can benefit.
> "DFS" <nospam@xxxxxxxx> wrote in message
> news:TI00f.2064$Yv6.1255@xxxxxxxxxxx
>> Stephen Lebans wrote:
>>> I'm not sure what you mean as the behaviour here is as expected in
>>> that the MonthCalendar window opens directly underneath the cursor.
>>
>> It opens so the top left of the calendar is at the mouse position.
>> I'd like
>> it to open so the middle of the calendar is at the mouse position.
>>
>>
>>> What version of the MonthCalendar are you using?
>>
>> 2.05
>>
>>
>>> Do you have the latest version dated March 22, 2005 ?
>>>
>>> What version of Access and Windows are you using?
>>
>> Access 2003, Windows Server 2003
>>
>>
>> Thanks
>>
>>
>>> HTH
>>> Stephen Lebans
>>> http://www.lebans.com
>>> Access Code, Tips and Tricks
>>> Please respond only to the newsgroups so everyone can benefit.
>>> "DFS" <nospam@xxxxxxxx> wrote in message
>>> news:fL5%e.1871$np2.952@xxxxxxxxxxx
>>>> If you're listening, I want the middle of the calendar (showing 1
>>>> month) to
>>>> open below the cursor position. It currently opens just to the
>>>> right and below the cursor position.
>>>>
>>>> I hunted through the code, but can't determine what to alter.
>>>>
>>>> Very nice piece of work, by the way.
>>>>
>>>> Thanks
.
- Follow-Ups:
- Re: Will Stephan Lebans answer questions about his Calendar 'control'?
- From: Stephen Lebans
- Re: Will Stephan Lebans answer questions about his Calendar 'control'?
- References:
- Re: Will Stephan Lebans answer questions about his Calendar 'control'?
- From: Stephen Lebans
- Re: Will Stephan Lebans answer questions about his Calendar 'control'?
- From: DFS
- Re: Will Stephan Lebans answer questions about his Calendar 'control'?
- From: Stephen Lebans
- Re: Will Stephan Lebans answer questions about his Calendar 'control'?
- Prev by Date: Record locking on Terminal Services
- Next by Date: Re: How many fields in a table
- Previous by thread: Re: Will Stephan Lebans answer questions about his Calendar 'control'?
- Next by thread: Re: Will Stephan Lebans answer questions about his Calendar 'control'?
- Index(es):
Relevant Pages
|