Click here to Skip to main content
15,889,851 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: Pass value from One form to another Pin
.NetDeveloper0921-Aug-10 22:51
.NetDeveloper0921-Aug-10 22:51 
GeneralRe: Pass value from One form to another Pin
.NetDeveloper0922-Aug-10 2:01
.NetDeveloper0922-Aug-10 2:01 
GeneralRe: Pass value from One form to another Pin
johannesnestler26-Aug-10 3:33
johannesnestler26-Aug-10 3:33 
GeneralRe: Pass value from One form to another Pin
.NetDeveloper0926-Aug-10 9:59
.NetDeveloper0926-Aug-10 9:59 
GeneralRe: Pass value from One form to another Pin
Luc Pattyn26-Aug-10 10:45
sitebuilderLuc Pattyn26-Aug-10 10:45 
GeneralRe: Pass value from One form to another Pin
.NetDeveloper0927-Aug-10 2:00
.NetDeveloper0927-Aug-10 2:00 
AnswerRe: Pass value from One form to another Pin
Pete O'Hanlon26-Aug-10 4:21
mvePete O'Hanlon26-Aug-10 4:21 
QuestionBinding a controls enabled property to a static class property based on a separate threads state Pin
Mycroft Holmes19-Aug-10 17:05
professionalMycroft Holmes19-Aug-10 17:05 
I have a method that queues a number of processes in a separate thread, long running stored procs. I want to disable controls and warn the user that the thread is still active so they cannot close the application while the thread is running.

I have a static class (clsMain) that has the property and the change event that is set from within the processing thread.

public static event EventHandler ProcessFlagChanged;
private static bool _IsProcessing;
public static bool IsProcessing
{
    get { return _IsProcessing; }
    set
    {
        _IsProcessing = value;

        if (ProcessFlagChanged != null)
            ProcessFlagChanged(null, EventArgs.Empty);
    }
}


I now want to bind a buttons enabled value to clsMain.IsProcessing. This naturally does not work because clsMain is a type.
btnLoadPool.DataBindings.Add(new Binding("Enabled", clsMain, "IsProcessing"));


Is the design flawed or do I need to have another variable/event on the form to bind to?
Never underestimate the power of human stupidity
RAH

AnswerRe: Binding a controls enabled property to a static class property based on a separate threads state Pin
Luc Pattyn19-Aug-10 18:01
sitebuilderLuc Pattyn19-Aug-10 18:01 
GeneralRe: Binding a controls enabled property to a static class property based on a separate threads state Pin
Mycroft Holmes19-Aug-10 19:41
professionalMycroft Holmes19-Aug-10 19:41 
GeneralRe: Binding a controls enabled property to a static class property based on a separate threads state Pin
Luc Pattyn20-Aug-10 1:31
sitebuilderLuc Pattyn20-Aug-10 1:31 
GeneralRe: Binding a controls enabled property to a static class property based on a separate threads state Pin
Mycroft Holmes20-Aug-10 3:24
professionalMycroft Holmes20-Aug-10 3:24 
Questionhow to make window form control scale with the form Pin
neodeaths17-Aug-10 0:08
neodeaths17-Aug-10 0:08 
AnswerRe: how to make window form control scale with the form Pin
Richard Blythe17-Aug-10 7:20
Richard Blythe17-Aug-10 7:20 
AnswerRe: how to make window form control scale with the form Pin
dan!sh 17-Aug-10 7:36
professional dan!sh 17-Aug-10 7:36 
AnswerRe: how to make window form control scale with the form Pin
johannesnestler26-Aug-10 3:44
johannesnestler26-Aug-10 3:44 
QuestionChange .exe icon Pin
Abdullah S. Abdelhay15-Aug-10 0:17
Abdullah S. Abdelhay15-Aug-10 0:17 
AnswerRe: Change .exe icon Pin
Richard MacCutchan15-Aug-10 1:13
mveRichard MacCutchan15-Aug-10 1:13 
AnswerRe: Change .exe icon Pin
ignrod15-Aug-10 5:51
ignrod15-Aug-10 5:51 
Questionclose form from its usercontrol Pin
Marcel Vreuls (www.agentbase.nl)13-Aug-10 11:18
Marcel Vreuls (www.agentbase.nl)13-Aug-10 11:18 
AnswerRe: close form from its usercontrol Pin
Matt U.13-Aug-10 12:43
Matt U.13-Aug-10 12:43 
GeneralRe: close form from its usercontrol Pin
Eslam Afifi13-Aug-10 14:29
Eslam Afifi13-Aug-10 14:29 
GeneralRe: close form from its usercontrol Pin
johannesnestler26-Aug-10 3:49
johannesnestler26-Aug-10 3:49 
GeneralRe: close form from its usercontrol Pin
Eslam Afifi26-Aug-10 9:57
Eslam Afifi26-Aug-10 9:57 
AnswerRe: close form from its usercontrol PinPopular
Luc Pattyn13-Aug-10 14:35
sitebuilderLuc Pattyn13-Aug-10 14:35 

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.