Click here to Skip to main content
15,909,939 members
Home / Discussions / C#
   

C#

 
QuestionHow to programatically manipulate forms authentication settings of web.config file Pin
tjkota20-Aug-08 11:46
tjkota20-Aug-08 11:46 
AnswerRe: How to programatically manipulate forms authentication settings of web.config file Pin
Christian Graus20-Aug-08 15:49
protectorChristian Graus20-Aug-08 15:49 
QuestionCreated Web Proxy but can't return images..C# Pin
DeepToot20-Aug-08 9:20
DeepToot20-Aug-08 9:20 
AnswerRe: Created Web Proxy but can't return images..C# Pin
DeepToot21-Aug-08 4:11
DeepToot21-Aug-08 4:11 
QuestionMDI; Finding a property on parent from MDI child form Pin
ianhunt0120-Aug-08 9:02
ianhunt0120-Aug-08 9:02 
AnswerRe: MDI; Finding a property on parent from MDI child form Pin
Mark Miller20-Aug-08 9:32
Mark Miller20-Aug-08 9:32 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
ianhunt0120-Aug-08 20:18
ianhunt0120-Aug-08 20:18 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
Mark Miller21-Aug-08 9:44
Mark Miller21-Aug-08 9:44 
Ian,

The DrawTools project uses a MDI parent form - I had forgotten it doesn't use any child forms.

Try this out for a solution to your problem:
In your child form expose some public or internal properties that are set when a toolbar button in the parent form is clicked. For example:

*** child form ***
public bool isPoly;

*** parent form ***
In the toolbarButton_Click(...) event:
if (ActiveMdiChild == null) return;
            var child = ActiveMdiChild as childformclass;
            child.isPoly = toolbarButton.Checked;

This way the child form(s) can see when a button on the toolbar in the parent is checked or not and react accordingly.

Additionally in the parent form you will want to react when the child form changes and set the state of buttons according to the active child form:

*** parent form ***
In MdiChildActivate event:
if (ActiveMdiChild == null) return;
            var child = ActiveMdiChild as childformclass;
            toolbarButton.Checked = child.isPoly;


HTH

Sincerely,

-Mark
mark@msdcweb.com
http://www.msdcweb.com

GeneralRe: MDI; Finding a property on parent from MDI child form Pin
ianhunt0121-Aug-08 21:22
ianhunt0121-Aug-08 21:22 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
Mark Miller23-Aug-08 14:46
Mark Miller23-Aug-08 14:46 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
ianhunt0124-Aug-08 21:15
ianhunt0124-Aug-08 21:15 
AnswerRe: MDI; Finding a property on parent from MDI child form Pin
led mike20-Aug-08 9:33
led mike20-Aug-08 9:33 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
ianhunt0120-Aug-08 20:16
ianhunt0120-Aug-08 20:16 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
led mike21-Aug-08 6:44
led mike21-Aug-08 6:44 
QuestionSyntax Coloring Control For Use In A C# App Pin
Kevin Marois20-Aug-08 8:39
professionalKevin Marois20-Aug-08 8:39 
AnswerRe: Syntax Coloring Control For Use In A C# App Pin
Mark Miller20-Aug-08 9:15
Mark Miller20-Aug-08 9:15 
QuestionHelp in Key Event needed Pin
Saiyed Alam20-Aug-08 5:48
Saiyed Alam20-Aug-08 5:48 
AnswerRe: Help in Key Event needed Pin
vikas amin20-Aug-08 6:52
vikas amin20-Aug-08 6:52 
AnswerRe: Help in Key Event needed Pin
Giorgi Dalakishvili20-Aug-08 6:55
mentorGiorgi Dalakishvili20-Aug-08 6:55 
AnswerRe: Help in Key Event needed Pin
Alan N20-Aug-08 8:20
Alan N20-Aug-08 8:20 
GeneralRe: Help in Key Event needed Pin
Saiyed Alam21-Aug-08 23:39
Saiyed Alam21-Aug-08 23:39 
GeneralRe: Help in Key Event needed Pin
Alan N26-Aug-08 6:57
Alan N26-Aug-08 6:57 
GeneralRe: Help in Key Event needed Pin
Saiyed Alam26-Aug-08 7:50
Saiyed Alam26-Aug-08 7:50 
QuestionChange values of pixels in an area? Pin
gigahertz20520-Aug-08 5:35
gigahertz20520-Aug-08 5:35 
AnswerRe: Change values of pixels in an area? Pin
vikas amin20-Aug-08 7:01
vikas amin20-Aug-08 7: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.