Click here to Skip to main content
15,916,941 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to open and read a file as a unicode char Pin
Life as a Coder4-Aug-07 0:03
Life as a Coder4-Aug-07 0:03 
GeneralRe: How to open and read a file as a unicode char Pin
Luc Pattyn4-Aug-07 0:17
sitebuilderLuc Pattyn4-Aug-07 0:17 
AnswerRe: How to open and read a file as a unicode char [modified] Pin
Guffa4-Aug-07 0:51
Guffa4-Aug-07 0:51 
AnswerRe: How to open and read a file as a unicode char Pin
Mike Dimmick4-Aug-07 3:36
Mike Dimmick4-Aug-07 3:36 
QuestionIs it possible to enable controls on the form from a class. Pin
Janu_M3-Aug-07 23:23
Janu_M3-Aug-07 23:23 
AnswerRe: Is it possible to enable controls on the form from a class. Pin
Luc Pattyn3-Aug-07 23:54
sitebuilderLuc Pattyn3-Aug-07 23:54 
GeneralRe: Is it possible to enable controls on the form from a class. Pin
Janu_M4-Aug-07 0:11
Janu_M4-Aug-07 0:11 
GeneralRe: Is it possible to enable controls on the form from a class. Pin
Colin Angus Mackay4-Aug-07 0:26
Colin Angus Mackay4-Aug-07 0:26 
The other class must know about the form - so you must pass details of the form to the other class (remember, forms are classes too) somehow. Then the class can access the form. You must provide a mechanism on the form to receive the request

class MyForm : Form
{
    ...
 
    // The form class needs a mechanism to receive the request to
    // disable the controls.
    public void DisableControls()
    {
        // Code to disable the controls goes here
    }
}
 
class MyOtherClass
{
    // The other class needs to store the form
    private MyForm myForm;
 
    // In this example the other class gets told about the form at
    // the time it is instantiated. It could also set up a property
    // to receive that information.
    public MyOtherClass(MyForm myForm)
    {
        this.myForm = myForm;
    }
 
    // The class has some code somewhere that needs to disable the
    // controls on the form.
    public SomeMethodThatNeedsToDisableTheControls()
    {
        ...
        myForm.DisableControls();
        ...
    }
}


Does this help?


Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...

"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."


My website

GeneralRe: Is it possible to enable controls on the form from a class. Pin
Luc Pattyn4-Aug-07 0:32
sitebuilderLuc Pattyn4-Aug-07 0:32 
AnswerRe: Is it possible to enable controls on the form from a class. Pin
Developer6114-Aug-07 0:14
Developer6114-Aug-07 0:14 
AnswerRe: Is it possible to enable controls on the form from a class. Pin
Manoj Kumar Rai4-Aug-07 0:27
professionalManoj Kumar Rai4-Aug-07 0:27 
GeneralRe: Is it possible to enable controls on the form from a class. Pin
Colin Angus Mackay4-Aug-07 0:33
Colin Angus Mackay4-Aug-07 0:33 
GeneralRe: Is it possible to enable controls on the form from a class. Pin
Manoj Kumar Rai4-Aug-07 0:37
professionalManoj Kumar Rai4-Aug-07 0:37 
AnswerRe: Is it possible to enable controls on the form from a class. Pin
Janu_M4-Aug-07 0:41
Janu_M4-Aug-07 0:41 
GeneralRe: Is it possible to enable controls on the form from a class. Pin
Developer6114-Aug-07 0:44
Developer6114-Aug-07 0:44 
QuestionTo genrate a log in text box Pin
Hum Dum3-Aug-07 21:49
Hum Dum3-Aug-07 21:49 
AnswerRe: To genrate a log in text box Pin
Christian Graus3-Aug-07 22:03
protectorChristian Graus3-Aug-07 22:03 
GeneralRe: To genrate a log in text box Pin
Hum Dum3-Aug-07 22:28
Hum Dum3-Aug-07 22:28 
QuestionHOw can I recreate .sln file that was deleted by system restore Pin
TheCat0073-Aug-07 20:25
TheCat0073-Aug-07 20:25 
AnswerRe: HOw can I recreate .sln file that was deleted by system restore Pin
Christian Graus3-Aug-07 21:15
protectorChristian Graus3-Aug-07 21:15 
GeneralRe: HOw can I recreate .sln file that was deleted by system restore Pin
TheCat0075-Aug-07 4:13
TheCat0075-Aug-07 4:13 
AnswerRe: HOw can I recreate .sln file that was deleted by system restore Pin
Eliz.k4-Aug-07 4:05
Eliz.k4-Aug-07 4:05 
Questionquery about ticker. Pin
Ravikumar Patra3-Aug-07 20:24
professionalRavikumar Patra3-Aug-07 20:24 
AnswerRe: query about ticker. Pin
Christian Graus3-Aug-07 21:17
protectorChristian Graus3-Aug-07 21:17 
GeneralRe: query about ticker. Pin
Ravikumar Patra4-Aug-07 7:51
professionalRavikumar Patra4-Aug-07 7:51 

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.