I have research the user32.dll properties on MSDN and other threads here and
it turns out that Stephens's code already exposes the property for
determining if a title bar is shown (or not shown). I am including the code
changes needed to prevent the title bar and the menu mars from being
displayed in the event anyone else may be interested.
To prevent the title bar for being displayed change the following coded as
follows:
In modCalendar - declarations change Private Const WS_OVERLAPPEDWINDOW to:
Private Const WS_OVERLAPPEDWINDOW As Long = (WS_OVERLAPPED Or WS_BORDER Or
WS_SYSMENU Or WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX)
Change "Public Function ShowMonthCalendar" to:
hWnd = CreateWindowEx(lngEXStyle, _
CLASSNAME, _
TITLE, _
WS_POPUPWINDOW Or WS_BORDER, _
CW_USEDEFAULT, _
CW_USEDEFAULT, _
CW_USEDEFAULT, _
CW_USEDEFAULT, _
mc.hWndForm, _
hMenu, _
hInstance, _
0&)
To hide the menu bars, comment out the following lines found in
modCalendar - ShowCalendar:
' Misc Properties Menu
'## lngRet = InsertMenu(hMenu, 2&, MF_POPUP Or MF_BYPOSITION Or
MF_ENABLED, hMenuPopMisc, "Properties")
'## lngRet = InsertMenu(hMenu, 1&, MF_BYPOSITION Or MF_ENABLED, 998, "Close
Window")
This is a crud fix and disables some niceties included in Stephen's original
code and also requires for some properties to be set in code. It should be
easy enough for me to add some additional code that will allow me my
modified version or the more robust version included in the original code.
If someone could, please look at the changes I have made and let me know if
I am doing something wrong as I have little API experience
Thanks
"Aikon" <ea********@bellsouth.netwrote in message
news:Aq******************@bignews2.bellsouth.net.. .
In my opinion, Stephen's calendar is by far a much better calendar choice
for Access by far. What I mean by "like for like" is from a display
perspective. I simply need to be able to display the calendar without a
window title and without the menu bars which is how the DTP is displayed.
I have been able to suppress the menu bars but do not know how to change
the window style so that the window title is suppressed. I assume it's a
API property value change but this level of programming is beyond my
meager skill set.
"Larry Linson" <bo*****@localhost.notwrote in message
news:ahzrg.64$Th7.55@trnddc05...
>"Aikon" <ea********@bellsouth.netwrote
I need a transparent replacement for the
MS DTpicker calendar. I found Stephen's
AMAZING Month Calendar but is there a
way to suppress the window title and
properties bars. Basically, I need a like
for like replacement for the DTP and need
to be able to set the properties in CODE.
If you want the Window format to not include these features, why can you
not open it in design view and change the properties there. As to other
properties that you may _need_ to change in code, it is a Windows form,
and the properties of Windows Forms and the Controls thereon are
available from code.
Why, exactly, would anyone _need_ an exact replacement for the Windows
date picker? It would seem to me that a functional equivalent, and
Stephen's is even more than that, as I recall, should do the trick.
Larry Linson
Microsoft Access MVP