Click here to Skip to main content
15,907,874 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# and sql recursive data query Pin
peropata21-Dec-10 9:19
peropata21-Dec-10 9:19 
GeneralRe: c# and sql recursive data query Pin
PIEBALDconsult21-Dec-10 10:10
mvePIEBALDconsult21-Dec-10 10:10 
AnswerRe: c# and sql recursive data query Pin
Mycroft Holmes21-Dec-10 12:05
professionalMycroft Holmes21-Dec-10 12:05 
GeneralRe: c# and sql recursive data query Pin
peropata21-Dec-10 22:08
peropata21-Dec-10 22:08 
Questiondesable a menustrip item Pin
mabrahao21-Dec-10 4:11
mabrahao21-Dec-10 4:11 
AnswerRe: desable a menustrip item Pin
fjdiewornncalwe21-Dec-10 4:16
professionalfjdiewornncalwe21-Dec-10 4:16 
GeneralRe: desable a menustrip item Pin
mabrahao21-Dec-10 4:37
mabrahao21-Dec-10 4:37 
GeneralRe: desable a menustrip item Pin
fjdiewornncalwe21-Dec-10 5:07
professionalfjdiewornncalwe21-Dec-10 5:07 
GeneralRe: desable a menustrip item Pin
mabrahao21-Dec-10 6:07
mabrahao21-Dec-10 6:07 
AnswerRe: desable a menustrip item Pin
phil.o21-Dec-10 4:52
professionalphil.o21-Dec-10 4:52 
GeneralRe: desable a menustrip item Pin
mabrahao21-Dec-10 4:57
mabrahao21-Dec-10 4:57 
GeneralRe: desable a menustrip item Pin
phil.o21-Dec-10 5:02
professionalphil.o21-Dec-10 5:02 
GeneralRe: desable a menustrip item Pin
fjdiewornncalwe21-Dec-10 5:10
professionalfjdiewornncalwe21-Dec-10 5:10 
GeneralRe: desable a menustrip item Pin
OriginalGriff21-Dec-10 5:26
mveOriginalGriff21-Dec-10 5:26 
GeneralRe: desable a menustrip item [modified] Pin
phil.o21-Dec-10 6:07
professionalphil.o21-Dec-10 6:07 
GeneralRe: desable a menustrip item Pin
fjdiewornncalwe21-Dec-10 9:59
professionalfjdiewornncalwe21-Dec-10 9:59 
GeneralRe: desable a menustrip item Pin
phil.o21-Dec-10 21:28
professionalphil.o21-Dec-10 21:28 
GeneralRe: desable a menustrip item Pin
musefan21-Dec-10 6:31
musefan21-Dec-10 6:31 
GeneralRe: desable a menustrip item Pin
fjdiewornncalwe21-Dec-10 9:51
professionalfjdiewornncalwe21-Dec-10 9:51 
GeneralRe: desable a menustrip item Pin
musefan22-Dec-10 2:29
musefan22-Dec-10 2:29 
GeneralRe: desable a menustrip item Pin
fjdiewornncalwe22-Dec-10 3:35
professionalfjdiewornncalwe22-Dec-10 3:35 
GeneralRe: desable a menustrip item Pin
musefan22-Dec-10 4:06
musefan22-Dec-10 4:06 
But then if there is multiple forms that can open forms 2, 3 and 4 then they are likely to have a different UI, which means different properties in your static class and therefore you still have to update code in Forms 2, 3 and 4 to account for this.

I do agree with you about the disadvantages of linking forms in your scenario of Forms 2, 3 and 4 can be opened by multiple forms and they need to disable controls in there parent. But regardless of the methods mentioned here, they all require Forms 2, 3, and 4 to be updated when any new Parent Forms/Controls are created

The way I see it is that if Form 2 needs to disable any controls in Form 1 then the 2 forms are already quite related (even if not directly by code). Therefore I see the best logic in being that anything in Form2 that determines that state of controls in Form1 should be presented as a property/method. Then Form1 can query the values at any time and update its own control state (perhaps an update event or if it is a Dialog then on close/result)

So...

Form2 has a property InvalidData
Form2 has an event Update
Form1 listens for Update event and then if InvalidData then disable control

...but then when Form3 pops up, you have to update code in Form1 to check state of new Forms properties. I just cannot think why a child form would need to disable controls in a parent unless that form was specifically created for that parent form alone

Oops, now I'm rambling. Happy holidays
return 5;

AnswerRe: desable a menustrip item Pin
AussieLew21-Dec-10 13:08
AussieLew21-Dec-10 13:08 
QuestionSTUN/NAT Traversal -> Connecting Problem Pin
softwarejaeger21-Dec-10 2:08
softwarejaeger21-Dec-10 2:08 
AnswerRe: STUN/NAT Traversal -> Connecting Problem Pin
Pete O'Hanlon21-Dec-10 3:05
mvePete O'Hanlon21-Dec-10 3:05 

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.