473,703 Members | 2,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

DFS
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
Nov 13 '05 #1
16 3046
I'm not sure what you mean as the behaviour here is as expected in that the
MonthCalendar window opens directly underneath the cursor. What version of
the MonthCalendar are you using?

Do you have the latest version dated March 22, 2005 ?

What version of Access and Windows are you using?
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"DFS" <nospam@dfs_.co m> wrote in message news:fL******** ********@fe02.l ga...
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

Nov 13 '05 #2
If Stephen Lebans has faulty or worthless software, take it up
privately with him. Do not take up the group's time for his
incompetence. In any case, everyone here already knows about his
ineptitude and lack of skill.

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. What version of
the MonthCalendar are you using?

Do you have the latest version dated March 22, 2005 ?

What version of Access and Windows are you using?
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"DFS" <nospam@dfs_.co m> wrote in message news:fL******** ********@fe02.l ga...
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


Nov 13 '05 #3
DFS
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@dfs_.co m> wrote in message
news:fL******** ********@fe02.l ga...
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

Nov 13 '05 #4
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.
If m_PositionAtCur sor 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_cursorXinitpo s and m_cursorYinitpo s 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
' PositionAtCurso r = 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@dfs_.co m> wrote in message
news:TI******** *********@fe06. lga...
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@dfs_.co m> wrote in message
news:fL******** ********@fe02.l ga...
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


Nov 13 '05 #5
DFS
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_PositionAtCur sor 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_cursorXinitpo s and m_cursorYinitpo s 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
' PositionAtCurso r = 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@dfs_.co m> wrote in message
news:TI******** *********@fe06. lga...
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@dfs_.co m> wrote in message
news:fL******** ********@fe02.l ga...
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

Nov 13 '05 #6
The MonthCalendar must be used as a modal window, period.

To change the Caption of the MonthCalendar window:
Open the module modCalendar
Towards the top of the source code find the line:
Private Const TITLE = "Month Calendar"
Change it to whatever you want.
Do not make any changes anywhere else to the Class name .Only change the one
line above.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"DFS" <nospam@dfs_.co m> wrote in message news:Sj******** *****@fe03.lga. ..
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_PositionAtCur sor 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_cursorXinitpo s and m_cursorYinitpo s 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
' PositionAtCurso r = 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@dfs_.co m> wrote in message
news:TI******** *********@fe06. lga...
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@dfs_.co m> wrote in message
news:fL******** ********@fe02.l ga...
> 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


Nov 13 '05 #7
Stephen,
(repeating a private e-mail sen tto you...)

Concerning focus issue:

I notice an issue with focus when:

I have a popup/non-modal form that creates an instance of the class
with:
OnFormLoad:
Set mc = New clsMonthCal
mc.hWndForm = Me.hWnd

On that form is a command button that opens a second form that is
popup/modal and it too creates an instance of the class with the same
OnFormLoad code.

When the user opens the calendar from the second form, the calendar
cannot be clicked because it does not have the focus. However, if the
use clicks any other application, or the Windows desktop, then clicks
the calendar, it works.

I took a look at how you deal with modal/popup forms but cannot figure
out a workaround for this situation. Is there a solution?

It is intriguing because the same originating form (the first form, has
a subform which also creates an instance with your code in the
OnFormLoad and that works fine!

Nov 13 '05 #8
Lauren I do not respond to private Email requests as there are simply too
many.

I am currently busy trying to add functionality to my Report to PDF solution
that I just posted tonight.
http://www.lebans.com/reporttopdf.htm

If you have a MDB that you can Email me I will take a look at your issue
this weekend. No promises though. Form/control focus issues are a nightmare
in Access. If you look at the MonthCalendar source code to see how I had to
handle this in Access you'll see what I mean. Those few lines of code cost
me hours of testing to finally get it right. I'm simply not willing to
change it for any circumstance at this point as the code is proven and works
well.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit
..

"Lauren Quantrell" <la************ *@hotmail.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
Stephen,
(repeating a private e-mail sen tto you...)

Concerning focus issue:

I notice an issue with focus when:

I have a popup/non-modal form that creates an instance of the class
with:
OnFormLoad:
Set mc = New clsMonthCal
mc.hWndForm = Me.hWnd

On that form is a command button that opens a second form that is
popup/modal and it too creates an instance of the class with the same
OnFormLoad code.

When the user opens the calendar from the second form, the calendar
cannot be clicked because it does not have the focus. However, if the
use clicks any other application, or the Windows desktop, then clicks
the calendar, it works.

I took a look at how you deal with modal/popup forms but cannot figure
out a workaround for this situation. Is there a solution?

It is intriguing because the same originating form (the first form, has
a subform which also creates an instance with your code in the
OnFormLoad and that works fine!

Nov 13 '05 #9
DFS
Stephen Lebans wrote:
I am currently busy trying to add functionality to my Report to PDF
solution that I just posted tonight.
http://www.lebans.com/reporttopdf.htm


Stephan,

Error report for you.

I'm running Access 2003. Extracted your zip file to a folder. Launched the
..mde, and none of the reports on the 'Convert report to PDF' tab will
convert. All throw the same error:

fCreateSnap.fPa rseSnap:-2147220958
Sorry...Page Size not supported
Please select a different Report to Export

The 'Convert Snapshot to PDF' did work.

(Haven't tried using it in my own .mdb yet. Nice tool, but a few months
late - could have saved a client of mine about $1500. I recommended Win2PDF
for them.)

Your calendar is nice!


Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2016
by: Larry R Harrison Jr | last post by:
Sometime, if an error has occured or even if a user has answered NO to a MsgBox Y/N question, the Lebans calendar control will prevent the form from closing. I know the Lebans calendar control is excellent--I have not once used the Active X Calendar Control since discovering it--but this is an error that I need to fix. I am supposing it's something in the form's UNLOAD procedure which would have to be tweaked. Tips?
5
3428
by: Larry R Harrison Jr | last post by:
I use the Lebans calendar control and love it; the only thing is that it commonly starts out at the year 1899 rather than the current year. Is there a way to specifically tell it to start at the current date instead? Note: it does this fine if I'm using it in the context of a form's text box, but I'm trying to use it on a module which is called, whereby the date chosen is the date plugged into a variable. Everytime after I reset the...
6
516
by: Mason | last post by:
I have a quick, probably easy, question about Lebans' calendar program. I have a form that allows a user to click on different technicians. When this happens, Lebans' calendar comes up with various dates set to bold based on the technician selected. However, when I close the calendar and select a different technician, the bold dates carry over from the previous technician selected. I can't find a way to clear the bold days after the...
10
3884
by: Ty Smith via AccessMonster.com | last post by:
I noticed that the week numbers in Stephan Leban's MonthCalendar are not consistent with Microsoft Outlook (they are shifted one week forward). Is there any way I can sync these two up by changing something in the module or the code in Stephan's MonthCalendar? Thanks, TySmith -- Message posted via http://www.accessmonster.com
5
1850
by: Dan Smith | last post by:
Right now the only way to use a WinForms control in MFC is to enable COM Interop for the control and use it in MFC as you would any ActiveX control. While this works, COM Interop is a pain, and an ActiveX control isn't as straight-forward as a CWnd-derived object. It also means that I have to split my code into two projects. Going the other way (using MFC in WinForms) is only possible by exposing MFC objects as ActiveX controls, which...
5
1507
by: Vaudousi | last post by:
Hi Dear Friends Is it possible to integrate Lebans calendar on a form in lieu and place of the Microsoft MonthView ? Many TKS in advance. José
5
2107
by: terrybell105 | last post by:
I downloaded Stephan's utility from his website but can't get it to work - or maybe I'm not driving it properly! The form works OK with the existing 3 "views" - I can switch between them and they display changes fine. But if I add or remove a table from any one of them, strange things happen. For example: start with a fresh copy of the downloaded database. Open the form and click on the "Admin" view. Right click and click on "Show Table"...
0
8758
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8669
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6588
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4432
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3123
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2450
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2069
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.