473,654 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

monthcalendar problem !

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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim frm As Form
frm = New Form2
frm.Show()
End Sub
Private Sub MonthCalendar1_ DateChanged(ByV al sender As Object,
ByVal e As System.Windows. Forms.DateRange EventArgs) Handles
MonthCalendar1. DateChanged
Dim dt As New DataTable
Dim dr As DataRow
dt.Columns.Add( "test")
dr = dt.NewRow()
dr.Item("test") = "test: " + Now.ToShortTime String
DataGrid1.DataS ource = dt
End Sub
you'll see after a while (every 2 minutes), the function is being
called, and the datagrid is filled with the testdata. Within my
application, the focus of the form is set, but if I make a new
application, the form with the monthcalendar is not getting the focus
indeed. I don't know why. Anyway, disable the monthcalendar refresh will
solve my problem.

Does anyone knows how to disable this monthcalendar refresh ? I've tried
to dynamically add/remove the datechanged handler from the
monthcalendar, but that didn't work.

Thanks,

Steven
Nov 21 '05 #1
0 1365

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

Similar topics

10
3880
by: Ty Smith via AccessMonster.com | last post by:
I noticed that the week numbers in Stephan Leban's MonthCalendar are not consistent with Microsoft Outlook (they are shifted one week forward). Is there any way I can sync these two up by changing something in the module or the code in Stephan's MonthCalendar? Thanks, TySmith -- Message posted via http://www.accessmonster.com
3
14250
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
3664
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
8
2610
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?
3
11001
by: RG | last post by:
For a Windows project in VB.NET 2003: I need a Calendar that’s much larger than the MonthCalendar control in the toolbox; it needs to fill the whole screen (at least approximately ). VB won’t allow me to change the Size Height or Width Properties. I see that you can size a Calendar control in a Web project all you like; but I’m creating a Windows application project here. I see that Size comes from System.Drawing.Size...
1
3520
by: DS | last post by:
I seem to have run into another strange anomaly with the monthCalendar control. I want to display 6 months at time with either the first half of the year (January-June) or the later half of the year (July-Dec) being rendered- depending on where todays date falls. I also want today's date to be selected. This poses a problem. Refer to the code below. Add a call to createCalendar() to your constructor (AFTER the InitializeComponents()...
2
5518
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
11
7370
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...
2
2727
by: SePp | last post by:
Hi there, I have a WindowsForm which includes a label. I want to add a date to this label which a user can select. I thought it is probably the best to open another WindowsForm and to add on this one a monthcalendar. My prolbem is: How can I use this MonthcalendarForm to edit / add the date of the label on other forms.
0
8294
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
8816
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
8709
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
8494
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
8596
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
5627
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
4150
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...
1
2719
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
2
1924
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.