Click here to Skip to main content
15,893,337 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: progressbar in statusstrip vb.net Pin
Christian Graus17-Dec-08 18:01
protectorChristian Graus17-Dec-08 18:01 
GeneralRe: progressbar in statusstrip vb.net Pin
jigneshDPatel17-Dec-08 19:59
jigneshDPatel17-Dec-08 19:59 
QuestionCheckedListBox with multi dimensional arrays Pin
Fahim A17-Dec-08 13:14
Fahim A17-Dec-08 13:14 
AnswerRe: CheckedListBox with multi dimensional arrays Pin
Christian Graus17-Dec-08 17:03
protectorChristian Graus17-Dec-08 17:03 
GeneralRe: CheckedListBox with multi dimensional arrays Pin
Fahim A18-Dec-08 11:59
Fahim A18-Dec-08 11:59 
QuestionRemotely Accessing Serial Port on LAN/Ethernet Pin
fahadi8617-Dec-08 12:54
fahadi8617-Dec-08 12:54 
AnswerRe: Remotely Accessing Serial Port on LAN/Ethernet Pin
Expert Coming17-Dec-08 12:57
Expert Coming17-Dec-08 12:57 
QuestionExtending MonthCalendar Control Pin
Member 271340117-Dec-08 10:07
Member 271340117-Dec-08 10:07 
(Using Visual Studio 2008)
I am trying to learn how to add functionality to the MonthCalendar control. I have looked at the C# example at this url http://www.codeproject.com/KB/selection/MonthCalendar.aspx[^]

However I am not a C# guy, and the custom control is a bit over kill.

Specifically, all I want to do is add the ability to set the color of a BoldedDate, either the forecolor or the back color. The C# example is nice, but it lacks the ability to have a 4x3 grid of calendars like the MonthCalendar has.

I have already created a Class with some code examples to add functionality for a double click event as follows:

Thanks
J

Public Class ExtendedMonthCalendar
Inherits MonthCalendar

Private m_LastClickPosition As Point
Private m_LastClickTime As Long
Private m_LastClickRaisedDoubleClick As Boolean



Public Shadows Event DoubleClick( _
ByVal sender As Object, _
ByVal e As EventArgs _
)

#Region "Events"

Protected Overrides Sub OnDoubleClick(ByVal e As EventArgs)
RaiseEvent DoubleClick(Me, e)
End Sub

Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
If e.Button = MouseButtons.Left Then
If _
Not m_LastClickRaisedDoubleClick AndAlso _
Now.Ticks - m_LastClickTime <= _
SystemInformation.DoubleClickTime * 10000 AndAlso _
IsInDoubleClickArea(m_LastClickPosition, Cursor.Position) _
Then
OnDoubleClick(EventArgs.Empty)
m_LastClickRaisedDoubleClick = True
Else
m_LastClickRaisedDoubleClick = False
End If
m_LastClickPosition = Cursor.Position
m_LastClickTime = Now.Ticks
End If
MyBase.OnMouseDown(e)
End Sub

Private Function IsInDoubleClickArea( _
ByVal Point1 As Point, _
ByVal Point2 As Point _
) As Boolean
Return _
Math.Abs(Point1.X - Point2.X) <= SystemInformation.DoubleClickSize.Width AndAlso _
Math.Abs(Point1.Y - Point2.Y) <= SystemInformation.DoubleClickSize.Height
End Function
#End Region

End Class
AnswerRe: Extending MonthCalendar Control Pin
Dave Kreskowiak18-Dec-08 4:03
mveDave Kreskowiak18-Dec-08 4:03 
GeneralRe: Extending MonthCalendar Control Pin
smurfman8718-Dec-08 10:45
smurfman8718-Dec-08 10:45 
GeneralRe: Extending MonthCalendar Control Pin
Dave Kreskowiak18-Dec-08 10:53
mveDave Kreskowiak18-Dec-08 10:53 
GeneralRe: Extending MonthCalendar Control Pin
smurfman8718-Dec-08 11:04
smurfman8718-Dec-08 11:04 
GeneralRe: Extending MonthCalendar Control Pin
Dave Kreskowiak18-Dec-08 16:44
mveDave Kreskowiak18-Dec-08 16:44 
GeneralRe: Extending MonthCalendar Control Pin
smurfman8719-Dec-08 3:30
smurfman8719-Dec-08 3:30 
GeneralRe: Extending MonthCalendar Control Pin
smurfman8719-Dec-08 6:09
smurfman8719-Dec-08 6:09 
QuestionHelp: ASP.NET Ajax client-side framework failed to load. [modified] Pin
Kip Smith17-Dec-08 10:00
Kip Smith17-Dec-08 10:00 
AnswerRe: Help: ASP.NET Ajax client-side framework failed to load. Pin
Christian Graus17-Dec-08 17:04
protectorChristian Graus17-Dec-08 17:04 
AnswerRe: Help: ASP.NET Ajax client-side framework failed to load. Pin
Kip Smith18-Dec-08 4:11
Kip Smith18-Dec-08 4:11 
Questionhow to send and read data through serial port using visual studio 2005? Pin
vivekmenon170617-Dec-08 8:03
vivekmenon170617-Dec-08 8:03 
AnswerRe: how to send and read data through serial port using visual studio 2005? Pin
Ben Fair17-Dec-08 8:51
Ben Fair17-Dec-08 8:51 
GeneralRe: how to send and read data through serial port using visual studio 2005? Pin
Luc Pattyn17-Dec-08 8:57
sitebuilderLuc Pattyn17-Dec-08 8:57 
QuestionOOOOOOOPS!!!!! Pin
kshincsk17-Dec-08 7:58
kshincsk17-Dec-08 7:58 
GeneralRe: OOOOOOOPS!!!!! Pin
Luc Pattyn17-Dec-08 9:00
sitebuilderLuc Pattyn17-Dec-08 9:00 
QuestionMulti User Application with Access database Pin
kshincsk17-Dec-08 7:56
kshincsk17-Dec-08 7:56 
AnswerRe: Multi User Application with Access database Pin
Dave Kreskowiak18-Dec-08 2:10
mveDave Kreskowiak18-Dec-08 2:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.