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.
"Aikon" <ea********@bellsouth.netwrote in message
news:Aq******************@bignews2.bellsouth.net.. .
An Experts Exchange member has shown me a means of preventing the
properties bar from showing by commenting out a single line. I am still
researching away to not show the window title from within Stephens
Calendar API. I know Stephen is a regular member here and so I posted a
new thread here in hopes that Stephen may enlighten me.
Anyway, you can prevent the property bars from showing by commenting out
the following 2 lines in the ShowCalander procedure located in
modCalendar:
--------------------------------------------------------------------------------------------------
'lngRet = InsertMenu(hMenu, 2&, MF_POPUP Or MF_BYPOSITION Or MF_ENABLED,
hMenuPopMisc, "Properties")
' Let's add Top level Menu Item that does not contain any submen items.
' We will use it like a CommandButton to allow the users to Close the
Calendar Window.
'lngRet = InsertMenu(hMenu, 1&, MF_BYPOSITION Or MF_ENABLED, 998, "Close
Window")
----------------------------------------------------------------------------------------------------
"Vincent" <an**********@verizon.netwrote in message
news:11**********************@s53g2000cws.googlegr oups.com...
>Sorry, I did not.
-Vincent
Aikon wrote:
>><However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.>
Did you find away to deactivate the menu controls at the top of the
calendar. I need to do this as well
"DFS" <nospam@dfs_.comwrote in message
news:5p*******************@bignews1.bellsouth.ne t...
Vincent wrote:
Thanks, DFS. This will work great. However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.
I'd rather control the layout of the calendar in code. Thanks.
I didn't develop it, of course, but Stephan Lebans has been pretty
responsive and still reads cdma, so maybe he'll answer.
I made some slight changes to his calendar code and my usage of it
looks
like this:
http://www.angelfire.com/planet/dfs0...s_calendar.PNG
-Vincent