How would I be able to check if a checkbox is checked from a childform and use that information on the parent?
GAME
-5
Junior Poster
Recommended Answers
Jump to PostAdd a public function in Child form
bool public GetStatus() { return checkbox1.Checked; }
And call this function where you have called for Child.Show();
Jump to PostIf you are fetching it in form load did you even check the child form yet wouldn't you get always false? (Unless you set it to be true by default).
Try this in form load.
ChildForm CF = new ChilForm() bool StatusCheck; if (CF.ShowDialog() == DialogResult.OK) …
Jump to PostHmm show me the code.
All 9 Replies
finito
46
Nearly a Posting Virtuoso
GAME
-5
Junior Poster
finito
46
Nearly a Posting Virtuoso
GAME
-5
Junior Poster
finito
46
Nearly a Posting Virtuoso
GAME
-5
Junior Poster
finito
46
Nearly a Posting Virtuoso
GAME
-5
Junior Poster
finito
46
Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.