Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Stephens' Visual Basic Programming 24-Hour Trainer
This is the forum to discuss the Wrox book Stephens' Visual Basic Programming 24-Hour Trainer by Rod Stephens; ISBN: 978-0-470-94335-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Stephens' Visual Basic Programming 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 28th, 2013, 09:43 PM
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2012
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Month Calender help

I have a button1 that when clicked, it opens a monthcalendar1 form. I would like to have the user select a date from the calendar and whatever date they selected shows up in the a textbox but in "yyMMdd" format. On some forums I've read, its states that if I want just the date and not the range I need to change the MaxSelectionCount=1 in the properties window and use the "monthcalendar.selectionend" in my code. Unfortunately no example of code was given. I'm not so worried about the date format right now but just getting it into the textbox. Any help greatly appreciated. Running visual studio 2010 in windows 7 if it helps.

Last edited by pooky; February 28th, 2013 at 09:45 PM..
Reply With Quote
  #2 (permalink)  
Old March 2nd, 2013, 02:56 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,187, Level: 23
Points: 3,187, Level: 23 Points: 3,187, Level: 23 Points: 3,187, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 646
Thanks: 2
Thanked 96 Times in 95 Posts
Default

To let the user select a single date, set the control's MaxSelectionCount property to 1. That means they can only select 1 day.

You could also consider using a DateTimePicker control instead. It takes less room and only lets the user select 1 date. It doesn't display a month calendar, though, and sometimes that's useful.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calender Brykneval ASP.NET 4 General Discussion 0 August 11th, 2011 02:47 AM
Converting month name to month number kalyanykk SQL Server 2005 7 August 19th, 2008 10:37 PM
query Current Month, Month+1, Month+2, Month+3 anterior Access 2 September 24th, 2006 08:25 PM
calender crmpicco Classic ASP Basics 2 March 23rd, 2005 01:21 PM
Calender gmoney060 Classic ASP Basics 4 August 23rd, 2004 12:10 AM



All times are GMT -4. The time now is 03:07 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.