PC Review


Reply
Thread Tools Rate Thread

How to do dirty check on a win form?

 
 
Suba
Guest
Posts: n/a
 
      30th Sep 2008
I am doing dirty check on my form. But when the user navigates away from the
form i need to prompt the user to save. I am showing a message box with
Yes/No/Cancel Buttons. Yes should save. No should ignore changes and on
cancel should stay in the same form.

I dont know on which event i should show the Message box prompting the user
to save. When i do it on leave its showing the form i need to show after
leaving. When i do it on validating event by setting e.cancel = true its
suppressing all the events after tat. Anyone has any idea how to do this
dirty check
 
Reply With Quote
 
 
 
 
Brian Gideon
Guest
Posts: n/a
 
      1st Oct 2008
On Sep 30, 2:27*pm, Suba <S...@discussions.microsoft.com> wrote:
> I am doing dirty check on my form. But when the user navigates away from the
> form i need to prompt the user to save. I am showing a message box with
> Yes/No/Cancel Buttons. Yes should save. No should ignore changes and on
> cancel should stay in the same form.
>
> I dont know on which event i should show the Message box prompting the user
> to save. When i do it on leave its showing the form i need to show after
> leaving. When i do it on validating event by setting e.cancel = true its
> suppressing all the events after tat. Anyone has any idea how to do this
> dirty check


Maybe I'm completely off base here, but what about the Closing event?
 
Reply With Quote
 
Suba
Guest
Posts: n/a
 
      2nd Oct 2008
Ah i couldnot use close event because my application has back button which
facilitates the user to view last 5 forms they viewed. So we are not actually
closing the form. We have all our forms in a mdi parent.

Is there any other way i can tackle dirty check?

"Brian Gideon" wrote:

> On Sep 30, 2:27 pm, Suba <S...@discussions.microsoft.com> wrote:
> > I am doing dirty check on my form. But when the user navigates away from the
> > form i need to prompt the user to save. I am showing a message box with
> > Yes/No/Cancel Buttons. Yes should save. No should ignore changes and on
> > cancel should stay in the same form.
> >
> > I dont know on which event i should show the Message box prompting the user
> > to save. When i do it on leave its showing the form i need to show after
> > leaving. When i do it on validating event by setting e.cancel = true its
> > suppressing all the events after tat. Anyone has any idea how to do this
> > dirty check

>
> Maybe I'm completely off base here, but what about the Closing event?
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
check disk / dirty bit skiczn Windows 7 6 4th Feb 2011 02:34 AM
check disk / dirty bit skiczn Windows 7 5 26th Oct 2010 08:36 PM
Unbound Fields on Form check for dirty fields amitger@gmail.com Microsoft Access Forms 1 13th Oct 2006 04:15 AM
detecting that a dirty form is no longer dirty Microsoft Access Form Coding 8 11th Aug 2004 11:41 AM
Check if custom form is "dirty" or form data has changed ? =?Utf-8?B?QWRhbSBHcmFuZ2Vy?= Microsoft Outlook VBA Programming 3 14th Nov 2003 11:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:00 AM.