Click here to Skip to main content
15,877,384 members
Home / Discussions / C#
   

C#

 
GeneralRe: Identifying DesignTime Mode for Forms Pin
leppie15-Sep-02 21:49
leppie15-Sep-02 21:49 
GeneralRe: Identifying DesignTime Mode for Forms Pin
Firoz16-Sep-02 0:03
Firoz16-Sep-02 0:03 
GeneralRe: Identifying DesignTime Mode for Forms Pin
leppie16-Sep-02 5:44
leppie16-Sep-02 5:44 
GeneralRe: Identifying DesignTime Mode for Forms Pin
James T. Johnson16-Sep-02 9:30
James T. Johnson16-Sep-02 9:30 
GeneralRe: Identifying DesignTime Mode for Forms Pin
leppie16-Sep-02 9:46
leppie16-Sep-02 9:46 
GeneralRe: Identifying DesignTime Mode for Forms Pin
James T. Johnson16-Sep-02 15:23
James T. Johnson16-Sep-02 15:23 
GeneralRe: Identifying DesignTime Mode for Forms Pin
Paul Riley16-Sep-02 23:01
Paul Riley16-Sep-02 23:01 
GeneralRe: Identifying DesignTime Mode for Forms Pin
leppie16-Sep-02 23:07
leppie16-Sep-02 23:07 
I think thats what James is telling us. We should only attempt to get a correct value from DesignMode after the form has been Loaded.

Something like this:

bool loaded = false;

protected override void OnLoad(EventArgs e){
  loaded = true;
  base.OnLoad(e);
}

Then we use:

public int SomeProperty {
  get {
    if (loaded & DesignMode) dosomethingelse();
    return someint;
  }
}


Correct me if I understand this wrong...Unsure | :~
GeneralRe: Identifying DesignTime Mode for Forms Pin
Paul Riley16-Sep-02 23:28
Paul Riley16-Sep-02 23:28 
GeneralRe: Identifying DesignTime Mode for Forms Pin
leppie17-Sep-02 0:32
leppie17-Sep-02 0:32 
Question.NET on other platforms? Pin
Zinj15-Sep-02 19:32
sussZinj15-Sep-02 19:32 
AnswerRe: .NET on other platforms? Pin
James T. Johnson15-Sep-02 21:24
James T. Johnson15-Sep-02 21:24 
GeneralRe: .NET on other platforms? Pin
Elf16-Sep-02 16:26
Elf16-Sep-02 16:26 
GeneralRe: .NET on other platforms? Pin
James T. Johnson17-Sep-02 0:52
James T. Johnson17-Sep-02 0:52 
GeneralRe: .NET on other platforms? Pin
David Stone17-Sep-02 4:22
sitebuilderDavid Stone17-Sep-02 4:22 
GeneralRe: .NET on other platforms? Pin
leppie17-Sep-02 4:49
leppie17-Sep-02 4:49 
AnswerRe: .NET on other platforms? Pin
Stephane Rodriguez.16-Sep-02 2:50
Stephane Rodriguez.16-Sep-02 2:50 
Questionole container in dotnet? Pin
novachen15-Sep-02 18:28
novachen15-Sep-02 18:28 
AnswerRe: ole container in dotnet? Pin
Elf15-Sep-02 18:35
Elf15-Sep-02 18:35 
AnswerRe: ole container in dotnet? Pin
James T. Johnson15-Sep-02 19:30
James T. Johnson15-Sep-02 19:30 
GeneralRe: ole container in dotnet? Pin
Anonymous15-Sep-02 21:36
Anonymous15-Sep-02 21:36 
GeneralRe: ole container in dotnet? Pin
Elf15-Sep-02 21:36
Elf15-Sep-02 21:36 
AnswerRe: ole container in dotnet? Pin
Stephane Rodriguez.16-Sep-02 2:46
Stephane Rodriguez.16-Sep-02 2:46 
GeneralOpening a file in Excel programatically Pin
leppie15-Sep-02 9:28
leppie15-Sep-02 9:28 
GeneralRe: Opening a file in Excel programatically Pin
Domenic Denicola15-Sep-02 12:09
Domenic Denicola15-Sep-02 12:09 

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.