Click here to Skip to main content
15,889,335 members
Home / Discussions / C#
   

C#

 
GeneralOpening A Form using Reflection Pin
Tristan Rhodes14-Apr-05 4:37
Tristan Rhodes14-Apr-05 4:37 
GeneralRe: Opening A Form using Reflection Pin
leppie14-Apr-05 4:56
leppie14-Apr-05 4:56 
GeneralRe: Opening A Form using Reflection Pin
Tristan Rhodes14-Apr-05 5:56
Tristan Rhodes14-Apr-05 5:56 
GeneralRe: Opening A Form using Reflection Pin
leppie14-Apr-05 6:12
leppie14-Apr-05 6:12 
GeneralRe: Opening A Form using Reflection Pin
Tristan Rhodes14-Apr-05 6:41
Tristan Rhodes14-Apr-05 6:41 
GeneralRe: Opening A Form using Reflection Pin
Dave Kreskowiak14-Apr-05 6:00
mveDave Kreskowiak14-Apr-05 6:00 
GeneralRe: Opening A Form using Reflection Pin
afinnell15-Apr-05 13:41
afinnell15-Apr-05 13:41 
GeneralDateTimePicker Problem Pin
drey114-Apr-05 4:14
drey114-Apr-05 4:14 
I put a question about this control yesterday, but unfortunatelly i could not get a solution.

So i change the flow of my program, but I still have one problem.
the DateTimePicker.valuechanged event executes twice...
I ask the other programmers here and not one knows why this control behives like this. So maybe someone have an answer. (searching the net i found two programmers that created new threads to resolve the problem, but that does not work for me, because I need the return from the "IsValid"Confused | :confused: ).
Code sample:

bool b = true;
//the code below does not work because the second time around the value still
//the original value in memory
if(((DateTimePicker)sender).Tag.ToString() == ((DateTimePicker)sender).Value.ToString()) return;

this.Cursor = Cursors.WaitCursor;

if(isValid(sender))
{
tToDate.MinDate = tFromDate.Value;
BindTimecard(tFromDate.Value,tToDate.Value);
((DateTimePicker)sender).Tag = ((DateTimePicker)sender).Value;
}

private bool IsValid(object sender, object r)
{
if(objdsIO.TimeCard.GetErrors().Length > 0)
{
string msg = "Please, Delete or Fix Records in Error, before Proceding!";
MessageBoxButtons button = MessageBoxButtons.OK;
MessageBoxIcon icon = MessageBoxIcon.Error;
MessageBox.Show(this,msg,"Error",button,icon);

((DateTimePicker)sender).ValueChanged -=new EventHandler(TimeDate_ValueChanged);
((DateTimePicker)sender).Value = DateTime.Parse(((DateTimePicker)sender).Tag.ToString());
((DateTimePicker)sender).ValueChanged +=new EventHandler(TimeDate_ValueChanged);

return false;
}
return true;
}
thank you for your help!
Generalwin32 dll & c# Pin
felopater14-Apr-05 3:58
felopater14-Apr-05 3:58 
GeneralRe: win32 dll & c# Pin
Dave Kreskowiak14-Apr-05 5:01
mveDave Kreskowiak14-Apr-05 5:01 
GeneralRe: win32 dll & c# Pin
felopater14-Apr-05 9:33
felopater14-Apr-05 9:33 
GeneralSystran Web Translator Pin
Dot Net14-Apr-05 3:27
Dot Net14-Apr-05 3:27 
GeneralError 998 on Windows API Call Pin
TyronX14-Apr-05 3:10
TyronX14-Apr-05 3:10 
GeneralRe: Error 998 on Windows API Call Pin
Dave Kreskowiak14-Apr-05 4:54
mveDave Kreskowiak14-Apr-05 4:54 
GeneralRe: Error 998 on Windows API Call Pin
TyronX14-Apr-05 9:48
TyronX14-Apr-05 9:48 
GeneralC# Datarelation questions Pin
elapid14-Apr-05 3:05
elapid14-Apr-05 3:05 
Question"printer select" common dialog? Pin
User-37793614-Apr-05 2:54
User-37793614-Apr-05 2:54 
QuestionHow to get GlobaHook Keyboard DeviceID? Pin
Jeltz114-Apr-05 2:23
Jeltz114-Apr-05 2:23 
GeneralError 1706 in VS.net 2003 Pin
.NET Professional14-Apr-05 1:40
.NET Professional14-Apr-05 1:40 
GeneralRe: Error 1706 in VS.net 2003 Pin
turbochimp14-Apr-05 2:41
turbochimp14-Apr-05 2:41 
GeneralRe: Error 1706 in VS.net 2003 Pin
.NET Professional15-Apr-05 2:39
.NET Professional15-Apr-05 2:39 
GeneralDirectShow Capture Application Pin
14-Apr-05 1:05
suss14-Apr-05 1:05 
GeneralHelp Files Pin
Anonymous14-Apr-05 0:52
Anonymous14-Apr-05 0:52 
GeneralRe: Help Files Pin
Ashok Dhamija14-Apr-05 1:03
Ashok Dhamija14-Apr-05 1:03 
GeneralRe: Help Files Pin
Anonymous14-Apr-05 1:37
Anonymous14-Apr-05 1:37 

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.