Re: Will Stephan Lebans answer questions about his Calendar 'control'?



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


.



Relevant Pages

  • Re: Will Stephan Lebans answer questions about his Calendar control?
    ... I simply changed the starting X position for the Window to be equal to the ... ' Also add an option to position cursor itself in middle of calendar ... >> that the MonthCalendar window opens directly underneath the cursor. ...
    (comp.databases.ms-access)
  • Re: Opening more than one Calendar in Outlook 2003
    ... Opened calendars in the same window do not persist. ... will allow you to open more than one calendar when you open Outlook. ... Milly Staples [MVP - Outlook] ...
    (microsoft.public.outlook.calendaring)
  • Re: Steve Lebans pdf conversion
    ... Access Code, Tips and Tricks ... Before the form opens, it brings up ... little window titled "Unhide Window" where it lists the db window and ... "Stephen Lebans" wrote: ...
    (microsoft.public.access.reports)
  • Entourage 2008 Calendar/To Do lists broken in Snow Leopard
    ... If she is in a mail window and clicks on the Calendar icon it ... If she opens the Calendar in a New ... and reinstalled Entourage settings were the same and it remembered that I had ...
    (microsoft.public.mac.office.entourage)
  • Re: Will Stephan Lebans answer questions about his Calendar control?
    ... The MonthCalendar must be used as a modal window, ... Stephen Lebans ... > * I want to change the title from 'Month Calendar' to Start Date or End ... >>> It opens so the top left of the calendar is at the mouse position. ...
    (comp.databases.ms-access)