473,789 Members | 2,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MonthCalendar background painting

Hi everyone-

I've done a lot of searching around on the web and I'm sure the answer to
this question is no, but I'll ask anyway. Is it possible to create an
inherited MonthCalendar control and override the member that paints the
background? I've tried working with OnPaint, OnPaintBackgrou nd to no avail.
Perhaps someone has a similar calendar control implementation out there?

Thanks,
Robert
Nov 16 '05 #1
2 5118
You might be able to do it by creating a WndProc and doing your painting on
the WM_ERASEBACKGRO UND message.

The problem is that the MonthCalendar control is based on a Windows Common
Control which is an ActiveX component, not a .NET component.

Syncfusion has a very powerful calendar control in their suite. It will let
you change the background painting and do a lot more. I'm sure there are
others out there as well.

Pete

"Robert Misiak" <ch***********@ yahoo-cut.this.part.o ut-.com> wrote in
message news:j1******** *********@newsr ead1.news.pas.e arthlink.net...
Hi everyone-

I've done a lot of searching around on the web and I'm sure the answer to
this question is no, but I'll ask anyway. Is it possible to create an
inherited MonthCalendar control and override the member that paints the
background? I've tried working with OnPaint, OnPaintBackgrou nd to no avail. Perhaps someone has a similar calendar control implementation out there?

Thanks,
Robert

Nov 16 '05 #2
You might be able to do it by creating a WndProc and doing your painting on
the WM_ERASEBACKGRO UND message.

The problem is that the MonthCalendar control is based on a Windows Common
Control which is an ActiveX component, not a .NET component.

Syncfusion has a very powerful calendar control in their suite. It will let
you change the background painting and do a lot more. I'm sure there are
others out there as well.

Pete

"Robert Misiak" <ch***********@ yahoo-cut.this.part.o ut-.com> wrote in
message news:j1******** *********@newsr ead1.news.pas.e arthlink.net...
Hi everyone-

I've done a lot of searching around on the web and I'm sure the answer to
this question is no, but I'll ask anyway. Is it possible to create an
inherited MonthCalendar control and override the member that paints the
background? I've tried working with OnPaint, OnPaintBackgrou nd to no avail. Perhaps someone has a similar calendar control implementation out there?

Thanks,
Robert

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3776
by: Ron Holmes | last post by:
I want to place a background image on a windows form. Is there a way to prevent the image from Tiling without using an image box resized to the size of the form? I am using Visual Studio 2003 .NET. This is an easy thing to do in VB6.
3
14263
by: michael_hk | last post by:
Hi, I am new to Windows Form programming and now have a simple Q about MonthCalendar. I want to hightlight some days in the calendar by changing the background color of these days. But I can't find any property or method that let me do this. What I know is that I can bold them... Thanks.
13
3676
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
0
1374
by: steven | last post by:
Start a new project with 2 forms: one with a datagrid, a button and a monthcalendar, and another form without controls. Try this code in your form with the monthcalendar: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim frm As Form frm = New Form2 frm.Show()
8
2620
by: vbmark | last post by:
I want the MonthCalendar control to return the single day selected. I have MaxSelectionCount = 1. What I get back though is this: "SelectionRange: Start: 5/5/2005 12:00:00 AM, End: 5/5/2005 12:00:00 AM" How do I get the single day date?
2
5536
by: meska | last post by:
Hi all, Scenario: I have a MonthCalendar control, and DataGridView. Depending on dates displayed in MonthCalendar I want to update information from database. The Possible Solution: So I must use DateChanged and/or DateSelected events to get the new dates
0
2043
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?
11
7391
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...
4
1871
by: Marina Levit | last post by:
I am trying to do some processing on a background thread while keeping the UI painting. However, this is a generic server side call routine - and it needs to block until the server side call completes. So the idea is, a server side call begins, it gets spun off on another thread to keep the UI painting - but, the code flow cannot return to the caller until the server side call completes, because the caller expects the data. The only way...
0
9663
marktang
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...
0
9511
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,...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10195
jinu1996
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...
1
10136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9979
tracyyun
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...
0
6765
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();...
0
5415
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...
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.