C#/C# form

Advertisement


Question
First of all I hope you have a good day!

I've created a windows form that contains some controls, when a user clicks on "Lock" button all controls become disabled, to enable them he should click on "Unlock" button, when he does so a form shows up, so the user should enter a password to enable the controls.
I've created two forms, main and password form, but when the user enters the correct pw and clicks on OK button, the controls are never enabled as expected. As you know the two forms are in different class, I failed to enable the controls through an object and public fields too.

Please advice for the solution.
Any help would be appreciated.

Thanks,
John

Answer
Hi John

Sorry I haven't worked that much with WinForms...  But I can give some ideas...

You can declare a global flag and on the right password process enable the flag and trigger the unlock event

I think this will work...

Happy Programming!!

-Srini

C#

All Answers


Answers by Expert:


Ask Experts

Volunteer


Srini Nagarajan

Expertise

can answer any kind of questions in ASP.NET, C#, VB.NET, ASP, SharePoint 2007, Coldfusion, Powerbuilder 7.00 / 8.00, JAVA servlets, MS SQL 2000 / MSSQL7, Sybase

Experience

Contact me if you need any custom development on ASP.NET, ASP, Coldfusion, Powerbuilder

©2012 About.com, a part of The New York Times Company. All rights reserved.