<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Vb6 CalendarEventLabel  help!</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : Vb6 CalendarEventLabel  help!]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 29 May 2026 17:43:26 +0000</pubDate>
  <lastBuildDate>Tue, 19 May 2009 07:19:17 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=14283</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Vb6 CalendarEventLabel  help! : I&amp;#039;ve coded some ansi c (and...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=49136&amp;title=vb6-calendareventlabel-help#49136</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5179">Jaymeister</a><br /><strong>Subject:</strong> 14283<br /><strong>Posted:</strong> 19 May 2009 at 7:19am<br /><br />I've coded some ansi c (and even some objective c on the mac)<br>the problem isn't code comprehension, as any programmer should be able to read most programming languages (write is another thing)<br>the problem is whats exposed to the vb6 programmer...<br><br>I tend to type a controls name followed by a dot "." and use the drop-down list of options to work out what should come next<br>for example I wanted to turn off the calendar's "click to add" message...<br>&nbsp; in C++ its...<br>&nbsp; GetCalendarCtrl().GetCalendarOptions()-&gt;bEnableAddNewTooltip = FALSE;<br>&nbsp; <br>&nbsp; but in VB6 its...<br>&nbsp; CalendarControl.Options.EnableAddNewTooltip = False<br><br>your forecolor issue is now a hunt the VB6 method that in C++ is...<br><font size="2">&nbsp; GetCalendarCtrl().GetPaintManager()-&gt;GetMonthViewEventPart()-&gt;m_clrTextHighLightColor = clrTxt;</font><br><br>]]>
   </description>
   <pubDate>Tue, 19 May 2009 07:19:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=49136&amp;title=vb6-calendareventlabel-help#49136</guid>
  </item> 
  <item>
   <title><![CDATA[Vb6 CalendarEventLabel  help! : Thanks for that but it might just...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=49128&amp;title=vb6-calendareventlabel-help#49128</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3440">DataFlowJoe</a><br /><strong>Subject:</strong> 14283<br /><strong>Posted:</strong> 19 May 2009 at 4:41am<br /><br />Thanks for that but it might just as well be chinese for me, I don't know anything about C++.<BR>Are there any examples for changing the font color using VB6, surely this should be the most basic of functions.<BR>The other issue&nbsp;is the BeforeDrawThemeObject Event doesn't seem to fire in my code, I've also checked the sample vb6 code that comes with codejock&nbsp;and it's not firing there either. What am I missing?<BR>]]>
   </description>
   <pubDate>Tue, 19 May 2009 04:41:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=49128&amp;title=vb6-calendareventlabel-help#49128</guid>
  </item> 
  <item>
   <title><![CDATA[Vb6 CalendarEventLabel  help! : Color wise I chose label colors...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=49125&amp;title=vb6-calendareventlabel-help#49125</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5179">Jaymeister</a><br /><strong>Subject:</strong> 14283<br /><strong>Posted:</strong> 19 May 2009 at 3:42am<br /><br /><div><font size="2">Color wise I chose label colors that were not dark, so the default black font would work,<br>but if you are letting users choose at runtime then, yep, someone is gonna choose rgb(0,0,0) :)<br><br>looking at the link, font forecolor seems to be set (the sample code is c code - I think) with<br><br>COLORREF clrTxt = RGB(255,0,0);</font><font size="2"><br></font></div><font size="2"><p>GetCalendarCtrl().GetPaintManager()-&gt;GetMonthViewEventPart()-&gt;m_clrTextHighLightColor = clrTxt;</p><p>...Oh how I wish they would give some good ol vb6 samples, anyone?<br></p></font>]]>
   </description>
   <pubDate>Tue, 19 May 2009 03:42:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=49125&amp;title=vb6-calendareventlabel-help#49125</guid>
  </item> 
  <item>
   <title><![CDATA[Vb6 CalendarEventLabel  help! : please referhttps://forum.code...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=49053&amp;title=vb6-calendareventlabel-help#49053</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2774">prashant</a><br /><strong>Subject:</strong> 14283<br /><strong>Posted:</strong> 15 May 2009 at 9:26am<br /><br />please refer<br><br>https://forum.codejock.com/forum_posts.asp?TID=11448&amp;KW=<br>]]>
   </description>
   <pubDate>Fri, 15 May 2009 09:26:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=49053&amp;title=vb6-calendareventlabel-help#49053</guid>
  </item> 
  <item>
   <title><![CDATA[Vb6 CalendarEventLabel  help! : Hi JayMeister, I&amp;#039;ve written...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=49027&amp;title=vb6-calendareventlabel-help#49027</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3440">DataFlowJoe</a><br /><strong>Subject:</strong> 14283<br /><strong>Posted:</strong> 15 May 2009 at 4:49am<br /><br /><P>Hi JayMeister,</P><P>I've written a routine that reads the colour codes in from a table. These colours can be set by the administartor using the colour picker which is part of the windows common dialog. The routine is called when the calendar form is loading.</P><DIV>'=============================================</DIV><DIV>Private Sub SetLabels()<BR>On Error Resume Next<BR>&nbsp;&nbsp;&nbsp; Dim rs1 As Recordset, strSQL As String</DIV><DIV>&nbsp;&nbsp;&nbsp; strSQL = "SELECT tblLabelColours.* FROM tblLabelColours;"<BR>&nbsp;&nbsp;&nbsp; Set rs1 = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Me.CalendarControl1.HideToolTip<BR>&nbsp;&nbsp;&nbsp; With CalendarControl1.DataProvider.LabelList<BR>&nbsp;&nbsp;&nbsp; .RemoveAll<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do Until rs1.EOF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddLabel rs1!&#091;ID&#093;, rs1!&#091;Colour&#093;, rs1!&#091;Label&#093;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rs1.MoveNext<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Loop<BR>&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp; <BR>End Sub</DIV><DIV>'=============================================</DIV><DIV>&nbsp;</DIV><DIV>The problem I've got now is to set the corresponding text in a contrasting colour. Getting a contrasting colour is simple with the following function....</DIV><DIV>&nbsp;</DIV><DIV>'=========================================</DIV><DIV>Public Function GetContrastColor(lngParamColor) As Long<BR>On Error Resume Next<BR>&nbsp;&nbsp;&nbsp; GetContrastColor = Not lngParamColor And &amp;HFFFFFF<BR>End Function</DIV><DIV>'=========================================</DIV><DIV>&nbsp;</DIV><DIV>I don't know how to set the colour of the text from the default black to my prefered contrast.</DIV><DIV>&nbsp;</DIV><DIV>I've tried the BeforeDrawThemeObject Event but I can't get it to fire in my code for some reason..... </DIV><DIV>Have you got any ideas, maybe we could collaborate a bit.</DIV><DIV>&nbsp;</DIV><DIV>Thanks</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 15 May 2009 04:49:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=49027&amp;title=vb6-calendareventlabel-help#49027</guid>
  </item> 
  <item>
   <title><![CDATA[Vb6 CalendarEventLabel  help! : WORKING - the index specified...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=48936&amp;title=vb6-calendareventlabel-help#48936</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5179">Jaymeister</a><br /><strong>Subject:</strong> 14283<br /><strong>Posted:</strong> 13 May 2009 at 6:59am<br /><br />WORKING - the index specified when adding a label starts from 0 - DOH!<br><br>Sub SetEventColor(TimeObject As CalendarEvent, ByVal R%, ByVal G%, ByVal B%)<br>&nbsp; Dim eLabel As CalendarEventLabel<br>&nbsp; 'step through labels to see if this color exists - if not create it<br>&nbsp; For Index% = 1 To frmMain.CalendarControl.DataProvider.LabelList.Count<br>&nbsp;&nbsp;&nbsp; If frmMain.CalendarControl.DataProvider.LabelList.Item(Index% - 1).Color = RGB(R%, G%, B%) Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ColorExists% = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit For<br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp; Next Index%<br>&nbsp; <br>&nbsp; If ColorExists% Then<br>&nbsp;&nbsp;&nbsp; TimeObject.Label = Index% - 1<br>&nbsp; Else<br>&nbsp;&nbsp;&nbsp; Index% = frmMain.CalendarControl.DataProvider.LabelList.Count + 1<br>&nbsp;&nbsp;&nbsp; frmMain.CalendarControl.DataProvider.LabelList.AddLabel Index% - 1, RGB(R%, G%, B%), "color" + Str$(Index%)<br>&nbsp;&nbsp;&nbsp; TimeObject.Label = Index% - 1<br>&nbsp; End If<br>End Sub<br>&nbsp;   ]]>
   </description>
   <pubDate>Wed, 13 May 2009 06:59:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=48936&amp;title=vb6-calendareventlabel-help#48936</guid>
  </item> 
  <item>
   <title><![CDATA[Vb6 CalendarEventLabel  help! : Tried this NO errors - still no...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=48935&amp;title=vb6-calendareventlabel-help#48935</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5179">Jaymeister</a><br /><strong>Subject:</strong> 14283<br /><strong>Posted:</strong> 13 May 2009 at 6:57am<br /><br />Tried this NO errors - still no color changes - any ideas???<br><br>Sub SetEventColor(TimeObject As CalendarEvent, ByVal R%, ByVal G%, ByVal B%)<br>&nbsp; Dim eLabel As CalendarEventLabel<br>&nbsp; 'step through labels to see if this color exists - if not create it<br>&nbsp; For Index% = 1 To frmMain.CalendarControl.DataProvider.LabelList.Count<br>&nbsp;&nbsp;&nbsp; If frmMain.CalendarControl.DataProvider.LabelList.Item(Index% - 1).Color = RGB(R%, G%, B%) Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ColorExists% = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit For<br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp; Next Index%<br>&nbsp; <br>&nbsp; If ColorExists% Then<br>&nbsp;&nbsp;&nbsp; TimeObject.Label = Index% - 1<br>&nbsp; Else<br>&nbsp;&nbsp;&nbsp; Index% = frmMain.CalendarControl.DataProvider.LabelList.Count + 1<br>&nbsp;&nbsp;&nbsp; frmMain.CalendarControl.DataProvider.LabelList.AddLabel Index%, RGB(R%, G%, B%), "color" + Str$(Index%)<br>&nbsp;&nbsp;&nbsp; TimeObject.Label = Index% - 1<br>&nbsp; End If<br>End Sub<br>&nbsp;]]>
   </description>
   <pubDate>Wed, 13 May 2009 06:57:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=48935&amp;title=vb6-calendareventlabel-help#48935</guid>
  </item> 
  <item>
   <title><![CDATA[Vb6 CalendarEventLabel  help! : can anyone post an example  vb6...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=48932&amp;title=vb6-calendareventlabel-help#48932</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5179">Jaymeister</a><br /><strong>Subject:</strong> 14283<br /><strong>Posted:</strong> 13 May 2009 at 6:27am<br /><br />can anyone post an example  vb6 sub of setting an events color?<br>I've googled around and it seems to be based on <br>using CalendarEventLabel but cannot find example of its usage in vb6<br>I tried...<br><br>sub SetEventColor(TimeObject As CalendarEvent, byval R%, byval G%, byval B%)<br>&nbsp; Dim eLabel As CalendarEventLabel<br>&nbsp; eLabel.Color = RGB(R%,G%,B%)<br>&nbsp; set TimeObject.Label = eLabel<br>end sub<br><br>...can anone help?<br>]]>
   </description>
   <pubDate>Wed, 13 May 2009 06:27:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14283&amp;PID=48932&amp;title=vb6-calendareventlabel-help#48932</guid>
  </item> 
 </channel>
</rss>