 |
| VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1).
** Please don't post code questions here **
For issues specific to a particular language in .NET, please see the other forum categories. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

April 6th, 2005, 01:15 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
Break when Calendar changes value in VB?
I am having a weird problem where a value in a standard Calendar object is changing but I cannot figure out what is changing it. I would like it to automatically break on the line that is causing the change, but cannot seem to figure out how to get VS to do this. The New Breakpoint dialog box ever-so-helpfully informs me that Basic doesn't support data breakpoints (Thanks once again, MicroSoft). Is there no way to figure out what line of code is causing this control to change?
|
|

April 10th, 2005, 03:38 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
ASP.NET or Win Forms?
How are you changing the calendar? Or you bind data to it?
BTW, did you ever see my follow up on our Combo Box thread? http://p2p.wrox.com/topic.asp?TOPIC_ID=14329
Cheers,
Imar
|
|

April 11th, 2005, 07:30 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
The calendar control is NOT bound, however, it is sometimes being changed by code and sometimes by the user. Based on previous problems experienced with bound controls, I am not a fan of them and therefore populate mine manually when displaying data from the database. This code is called on the form load only. But the user may also change the value in the field. And it may change as a result of changing another calendar control on the form.
So there are a variety of circumstances in which the control can be changed. And somewhere in there it is getting caught in some loop that is slowly advancing the date but I can't seem to isolate it by simply putting breakpoints on the lines that obviously change the control's date properties. Have you noticed that breakpoints don't always appear to fire? So I'd hoped if I could set a watch on the control, I could catch the line. No luck so far.
|
|

April 11th, 2005, 11:58 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Right, I see. What you could do is write a handler for when the date changes. In an ASP.NET calendar, that event is called SelectionChanged. You can set a breakpoint inside the handler, so at least you can diagnose the environment, and try to find out what's causing the date to be changed.
Quote:
quote:Originally posted by Imar
BTW, did you ever see my follow up on our Combo Box thread? http://p2p.wrox.com/topic.asp?TOPIC_ID=14329
|
Cheers,
Imar
|
|

April 11th, 2005, 01:18 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
Oh, I have. The problem is not what's happening in the handler - it's what's CAUSING the handler to fire to begin with. I'm not even sure the handler is being called immediately - VS sometimes appears to wait until an opportune moment to fire events. So while the call stack works wonderfully when tracing explicit function calls, it appears worthless for determining what has caused an event to fire. Like I said, I've put breakpoints on every explicit combobox code reference and cannot get the program to stop when the value is changing, so it feels like it's something more subtle than an explicit property change causing this.
And yes, I responded to your follow up on the combo box thread. I figured that thread would alert you to my response and so chose not to cross-post it here as well.
|
|

April 11th, 2005, 01:29 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Very odd indeed. Can you show us some of your code (if it would make sense to post it)? And is this a Windows forms or Web forms app?
Sorry I missed your post; There seems to be a big delay at the moment between posting on the site and receiving a message in my Inbox.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| VB 6 Calendar |
CoolEJ |
Beginning VB 6 |
4 |
October 9th, 2007 02:26 AM |
| VB.NET Calendar |
cyndie |
VB.NET |
1 |
January 21st, 2005 07:05 AM |
| Calendar VB |
malladu |
BOOK: Beginning ASP.NET 1.0 |
1 |
September 26th, 2004 11:46 PM |
| VB.net Calendar |
KennethMungwira |
VB.NET |
2 |
November 13th, 2003 11:02 AM |
| Calendar in VB form |
greatmanu |
Excel VBA |
1 |
September 11th, 2003 04:26 PM |
|
 |