Click here to Skip to main content
15,917,321 members
Home / Discussions / C#
   

C#

 
GeneralMaking PropertyGrid read only Pin
Tristan Rhodes14-Apr-05 7:03
Tristan Rhodes14-Apr-05 7:03 
GeneralRe: Making PropertyGrid read only Pin
Dave Kreskowiak14-Apr-05 8:29
mveDave Kreskowiak14-Apr-05 8:29 
GeneralRe: Making PropertyGrid read only Pin
Tristan Rhodes16-Apr-05 9:36
Tristan Rhodes16-Apr-05 9:36 
GeneralI don't know how to use CryptoStream class with Streamwriter and Streamreader Pin
Mohammed Aijaz Mohiuddin14-Apr-05 7:03
Mohammed Aijaz Mohiuddin14-Apr-05 7:03 
GeneralRe: I don't know how to use CryptoStream class with Streamwriter and Streamreader Pin
Steven Campbell14-Apr-05 7:24
Steven Campbell14-Apr-05 7:24 
GeneralMaking PropertyGrid read only Pin
Tristan Rhodes14-Apr-05 6:58
Tristan Rhodes14-Apr-05 6:58 
GeneralDTE.GetObject() Pin
jctk14-Apr-05 5:56
jctk14-Apr-05 5:56 
GeneralRe: DTE.GetObject() Pin
Dave Kreskowiak14-Apr-05 6:09
mveDave Kreskowiak14-Apr-05 6:09 
GeneralRe: DTE.GetObject() Pin
jctk14-Apr-05 7:33
jctk14-Apr-05 7:33 
QuestionC# XML Documentation comments - any way to make the HTML cross-browser? Pin
jimf1inmd14-Apr-05 5:13
jimf1inmd14-Apr-05 5:13 
AnswerRe: C# XML Documentation comments - any way to make the HTML cross-browser? Pin
leppie14-Apr-05 6:10
leppie14-Apr-05 6:10 
GeneralRe: C# XML Documentation comments - any way to make the HTML cross-browser? Pin
jimf1inmd15-Apr-05 4:49
jimf1inmd15-Apr-05 4:49 
GeneralowNetworking Pin
Alper Camel14-Apr-05 4:59
Alper Camel14-Apr-05 4:59 
GeneralRe: owNetworking Pin
hooray14-Apr-05 7:17
hooray14-Apr-05 7:17 
GeneralRe: owNetworking Pin
Alper Camel14-Apr-05 22:35
Alper Camel14-Apr-05 22:35 
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 

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.