Click here to Skip to main content
15,891,529 members
Home / Discussions / C#
   

C#

 
AnswerRe: operate the pc through voice command in c# Pin
Member 873075321-Apr-12 11:26
Member 873075321-Apr-12 11:26 
QuestionIframe page login not working fine in IE...,But working fine in Mozila browser..., Pin
Member 387988122-Feb-11 1:22
Member 387988122-Feb-11 1:22 
AnswerRe: Iframe page login not working fine in IE...,But working fine in Mozila browser..., Pin
Peter_in_278022-Feb-11 15:54
professionalPeter_in_278022-Feb-11 15:54 
QuestionHow to display Warning Message When Uploading a File.. Pin
Rocky2322-Feb-11 0:18
Rocky2322-Feb-11 0:18 
AnswerRe: How to display Warning Message When Uploading a File.. Pin
Luc Pattyn22-Feb-11 0:32
sitebuilderLuc Pattyn22-Feb-11 0:32 
GeneralRe: How to display Warning Message When Uploading a File.. [modified] Pin
Bernhard Hiller22-Feb-11 20:31
Bernhard Hiller22-Feb-11 20:31 
GeneralRe: How to display Warning Message When Uploading a File.. [Code Updated] Pin
Rocky2322-Feb-11 23:18
Rocky2322-Feb-11 23:18 
QuestionPreventing MDI child form from losing focus Pin
Dewald21-Feb-11 23:24
Dewald21-Feb-11 23:24 
Hi all, I have an MDI container app with several MDI children forms that can be open at any one time. I had a problem, which I think I've solved fairly elegantly, but which introduced a new problem. Maybe someone here can make suggestions.

The original problem:
Changes on one MDI child form could affect the contents of another MDI child form. So what I did was to have each MDI form implement an interface with a RefreshForm() function. Each MDI child form will the override this function in which the data on the form is repopulated. Whenever a form submits changes to the data source (ie. changes that might affect the contents of any other form, it calls a function which iterates through all the open MDI children forms on the app and calls the RefreshForm() function for each.

The new problem:
The new problem is that, if a user was still busy editing data on Form A, switches to Form B to make changes there without submitting the changes he was busy making to Form A and then submitting the changes he made to Form B, you can already guess what happens. Form A gets repopulated and all unsaved changes are lost. No way around this, at least not that I can think of.

So I was thinking I can override the Deactivate event handler for these forms and warn the user that changes have been made and that these may be lost. I'd like, however, to provide an "OK" and "Cancel" button on the MessageBox, so that the "Cancel" button will take the user right back to the form he was busy editing. But how?

If, in the Deactivate event handler I show a MessageBox and call FormA.Focus() if the user clicks "Cancel", for some reason the newly selected form still has focus as opposed to Form A.

Any advice?
AnswerRe: Preventing MDI child form from losing focus Pin
Mycroft Holmes22-Feb-11 0:07
professionalMycroft Holmes22-Feb-11 0:07 
GeneralRe: Preventing MDI child form from losing focus Pin
Wayne Gaylard22-Feb-11 0:44
professionalWayne Gaylard22-Feb-11 0:44 
GeneralRe: Preventing MDI child form from losing focus Pin
Dewald22-Feb-11 0:51
Dewald22-Feb-11 0:51 
GeneralRe: Preventing MDI child form from losing focus Pin
Mycroft Holmes22-Feb-11 11:00
professionalMycroft Holmes22-Feb-11 11:00 
GeneralRe: Preventing MDI child form from losing focus Pin
Dewald22-Feb-11 19:03
Dewald22-Feb-11 19:03 
GeneralRe: Preventing MDI child form from losing focus Pin
Mycroft Holmes22-Feb-11 19:34
professionalMycroft Holmes22-Feb-11 19:34 
GeneralRe: Preventing MDI child form from losing focus Pin
Dewald22-Feb-11 19:45
Dewald22-Feb-11 19:45 
QuestionGet IP address on a LAN [modified] Pin
Mc_Topaz21-Feb-11 23:14
Mc_Topaz21-Feb-11 23:14 
AnswerRe: Get all IP address on a LAN Pin
Rob Philpott21-Feb-11 23:32
Rob Philpott21-Feb-11 23:32 
GeneralRe: Get all IP address on a LAN Pin
Mc_Topaz21-Feb-11 23:43
Mc_Topaz21-Feb-11 23:43 
GeneralRe: Get all IP address on a LAN Pin
Rob Philpott22-Feb-11 1:39
Rob Philpott22-Feb-11 1:39 
AnswerRe: Get IP address on a LAN Pin
OriginalGriff21-Feb-11 23:36
mveOriginalGriff21-Feb-11 23:36 
Questionhandle data in GUI (datagridview) and database Pin
Ronenb21-Feb-11 21:29
Ronenb21-Feb-11 21:29 
AnswerRe: handle data in GUI (datagridview) and database Pin
OriginalGriff21-Feb-11 21:48
mveOriginalGriff21-Feb-11 21:48 
GeneralRe: handle data in GUI (datagridview) and database Pin
Mycroft Holmes22-Feb-11 0:10
professionalMycroft Holmes22-Feb-11 0:10 
GeneralRe: handle data in GUI (datagridview) and database Pin
OriginalGriff22-Feb-11 0:14
mveOriginalGriff22-Feb-11 0:14 
GeneralRe: handle data in GUI (datagridview) and database Pin
Ronenb22-Feb-11 1:28
Ronenb22-Feb-11 1:28 

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.