Click here to Skip to main content
15,895,011 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 
Sorry. I should have been clearer.
You can create a static class (public static class ClassName) where you store the values. If you place this class in your UI project, you can use it to store properties relating to the visibility of controls. (ie. public static bool thisControlIsVisible{ get; set; }). In your forms, you can use the appropriate event handler for gaining focus to coordinate the visibility or enabled states of controls on a given form.
Example. In Form1, an action taken by the user requires that menustrip item in Form2 be disabled. Form1 will set a variable in the static state class indicating this. When Form2 receives focus, it will automatically check these values and update itself appropriately.

Some people may suggest that you use the App.Config file for this purpose, but I would strongly suggest you not do that because the changes you effect to the app.config at runtime will be maintained and used the next time the application is run again.
I wasn't, now I am, then I won't be anymore.

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 
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.