Click here to Skip to main content
16,006,440 members
Home / Discussions / C#
   

C#

 
AnswerRe: Controlling the source of a drag/drop Pin
Dave Kreskowiak1-Dec-06 5:40
mveDave Kreskowiak1-Dec-06 5:40 
GeneralRe: Controlling the source of a drag/drop Pin
Dan Neely1-Dec-06 5:42
Dan Neely1-Dec-06 5:42 
GeneralRe: Controlling the source of a drag/drop Pin
Dan Neely1-Dec-06 8:09
Dan Neely1-Dec-06 8:09 
GeneralRe: Controlling the source of a drag/drop Pin
Dave Kreskowiak1-Dec-06 8:17
mveDave Kreskowiak1-Dec-06 8:17 
GeneralRe: Controlling the source of a drag/drop Pin
Dan Neely1-Dec-06 8:21
Dan Neely1-Dec-06 8:21 
QuestionMaking dates Pin
digsy_1-Dec-06 4:36
digsy_1-Dec-06 4:36 
AnswerRe: Making dates Pin
Guffa1-Dec-06 4:56
Guffa1-Dec-06 4:56 
AnswerRe: Making dates Pin
Pete O'Hanlon1-Dec-06 4:59
mvePete O'Hanlon1-Dec-06 4:59 
This looks suspiciously homeworkyBig Grin | :-D . Anyway, here's the easy way to do it:

// To get the start date.
DateTime startDate = new DateTime(selectedYear, selectedMonth, 1, 0, 0, 0, 0);
// Add 1 month to get the start of next month, and then subtract 1 day.
DateTime endDate = startDate.AddMonths(1).AddDays(-1);


You can use a similar trick to get the first and last days from any date:

// Set to the 26th November 2006
DateTime dt = new DateTime(2006, 11, 26,0,0,0,0);
// Gets the 1st November
DateTime startDate = dt.AddDays((-(dt.Day)) + 1);
// Gets the 30th November
DateTime endDate = startDate.AddMonths(1).AddDays(-1);


Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."

Deja View - the feeling that you've seen this post before.

Questionwhat is this used for --> @ Pin
karanba1-Dec-06 4:34
karanba1-Dec-06 4:34 
AnswerRe: what is this used for --> @ Pin
eggsovereasy1-Dec-06 4:44
eggsovereasy1-Dec-06 4:44 
GeneralRe: what is this used for --> @ Pin
karanba1-Dec-06 4:57
karanba1-Dec-06 4:57 
AnswerRe: what is this used for --> @ Pin
Guffa1-Dec-06 5:00
Guffa1-Dec-06 5:00 
GeneralRe: what is this used for --> @ Pin
WILLIAM MAIN2-Dec-06 17:22
WILLIAM MAIN2-Dec-06 17:22 
QuestionC# Program in System tray Pin
Mutyala Rao1-Dec-06 4:03
Mutyala Rao1-Dec-06 4:03 
AnswerRe: C# Program in System tray Pin
Not Active1-Dec-06 4:16
mentorNot Active1-Dec-06 4:16 
AnswerRe: C# Program in System tray Pin
Eduard Keilholz1-Dec-06 4:16
Eduard Keilholz1-Dec-06 4:16 
GeneralRe: C# Program in System tray Pin
Mutyala Rao9-Mar-07 23:42
Mutyala Rao9-Mar-07 23:42 
QuestionShortkut keys urgent help needed Pin
sujithkumarsl1-Dec-06 3:53
sujithkumarsl1-Dec-06 3:53 
AnswerRe: Shortkut keys urgent help needed Pin
Not Active1-Dec-06 4:15
mentorNot Active1-Dec-06 4:15 
GeneralRe: Shortkut keys urgent help needed Pin
sujithkumarsl1-Dec-06 4:16
sujithkumarsl1-Dec-06 4:16 
GeneralRe: Shortkut keys urgent help needed Pin
Dave Kreskowiak1-Dec-06 4:57
mveDave Kreskowiak1-Dec-06 4:57 
GeneralRe: Shortkut keys urgent help needed Pin
sujithkumarsl1-Dec-06 17:57
sujithkumarsl1-Dec-06 17:57 
QuestionDrag and drop files Pin
Now_Loading1-Dec-06 3:44
Now_Loading1-Dec-06 3:44 
QuestionPrint Graphics Pin
netJP12L1-Dec-06 3:40
netJP12L1-Dec-06 3:40 
AnswerRe: Print Graphics Pin
Ed.Poore1-Dec-06 3:47
Ed.Poore1-Dec-06 3:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.