ShowDialog form with MonthCalendar over the button that shows calendar
Posted on 2008-11-03
I have various forms that contain date maskedtextboxes and a button to the right of each textbox inside either a tabcontrol, panel or both. The button will showdialog this form that contains a MonthCalendar with only a Close option in top right.
I am attempting to pass the location of the button so that the top/left corner of Calendar form can be displayed just over the top/left corner of button. Below is the code to kick off the calendar.
Dim frm As New Misc_CalendarDateSelect(104, "txtDueDate", txtDueDate.Text, Me.Panel1.Location + Me.cmdDueDateCalendar.Location)
The positioning, however is always high and too far to left. Where am I going wrong???