Hi, it seems this is a common demand and the control does not provide
simple ways to do it, This is like a brute force attack but it worked
for me...
void SelectAllDates( ){
Graphics g = monthCalendar1. CreateGraphics( );
MonthCalendar.H itTestInfo oHTI;
ArrayList oDatesArray = new ArrayList();
for(int x=1;x<monthCale ndar1.Size.Widt h;x=x+1)//try to increase the
step to speed up...
{
for (int y=1;y<monthCale ndar1.Size.Heig ht;y=y+1)
{
oHTI = monthCalendar1. HitTest(x,y);
if (oHTI.HitArea == MonthCalendar.H itArea.Date)
{
if(!oDatesArray .Contains(oHTI. Time))
{
oDatesArray.Add (oHTI.Time);
g.DrawRectangle (new Pen(Brushes.Red ,2), x, y,24,15);//you will
probably have to adjust the height and width of the red square for you
control size which depends on the font size
}
}
}
}
} 0 1829 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rachel Suddeth |
last post by:
Is there a way to have the non-selectable dates (those before MinDate and
after MaxDate) draw differently so my users can see right away what dates
aren't allowed? I'm not seeing it...
Otherwise, anyone know of a cheap 3rd party calendar control I could use
that would provide that ability?
Thanks,
Rachel
|
by: Steven |
last post by:
Hello,
I have an application with multiple forms. I open 2 (different) forms,
one with numerous controls, say A, and one with a MonthCalendar, a
Combobox and a datagrid, say B.
When I work in A, but B is also open, sometimes A is set behind, and B
appears on top of A. Amazingly, B doesn't get the focus, the focus is
still in A. It's just that B appears on top of A (B's menubalk is still
gray).
|
by: Brian Henry |
last post by:
Is there anyway to get bold dates to show up on the drop down month calendar
on the date time picker? I need a way to show that something occured on a
date on the dropdown, and I can't find a boldeddates array like the
monthcalendar has for the dropdown... Is there anyway to access the month
calendar in the date time picker dropdown and add bolded dates to it? thanks
|
by: steven |
last post by:
A monthcalendar checks every 2 minutes if theres a new day. Does anyone
knows how to disable this ?
The problem is that, everytime a monthcalendar checks this, the form
where the monhcalendar is on, gets the focus, which is VERY annoying.
Thanks,
Steven
|
by: ramesh.nrk |
last post by:
Hi,
In my windows application I need to display MonthCalendar control
with some selected dates.
I am using the property "Bolded Dates" to add selected/some dates.
But those dates are displayed in "BOLD".
But I need to display with different background color.
How can I display the "Bolded Dates" in different Background color?
| |
by: CuriousOne1 |
last post by:
Hi all,
I don't know if anyone has come accross this before. I've been using Steve Lebans Calendar control (available here: www.lebans.com/monthcalendar.htm ) for several database application I've built.
I only noticed recently, that after I've selected a date range, by highlighting the desired date, e.g. from 1 August 2007 to 7 August 2007, if I then use the navigation buttons to scroll from month to month, the same number of days is...
|
by: jonasi |
last post by:
Hi,
I would like to use several colors to display some specific dates in my monthcalendar.
By example, some dates will be displayed in red color, others in green color...
Have you got any solutions ?
Thanks in advance.
|
by: Chris Shepherd |
last post by:
Greetings group,
I have a situation where I'd like to visibly see disabled dates on a
DateTimePicker. Frequently the Min and Max dates in the picker will be
set only to days apart, and so I would like this to be reflected in a
way other than it simply failing to select when they click. It seems
like this would be doable with a MonthCalendar control, however the
DateTimePicker itself doesn't seem to expose an internal MonthCalendar,
nor...
|
by: Randy |
last post by:
I have a MonthCalendar on one of my forms. I have disovered that the
DateChanged event is triggered not only when the user clicks on a new
date, but also if they click on the Previous or Next Month arrows
(meaning they click on either of the left or right pointing arrows in
the top corner). If the user changes the month, it messes up some of
the date logic that I have in the DateChanged event. Does anybody
know how I can capture this...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |