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

C#

 
GeneralIndexer problem Pin
nothign12312330-Oct-02 11:31
nothign12312330-Oct-02 11:31 
GeneralStrange Mutex Behavior Pin
EricK730-Oct-02 9:26
sussEricK730-Oct-02 9:26 
GeneralRe: Strange Mutex Behavior Pin
EricK730-Oct-02 11:17
sussEricK730-Oct-02 11:17 
GeneralRe: Strange Mutex Behavior Pin
Richard Deeming30-Oct-02 23:50
mveRichard Deeming30-Oct-02 23:50 
GeneralRe: Strange Mutex Behavior Pin
EricK731-Oct-02 3:40
sussEricK731-Oct-02 3:40 
GeneralInitiateComponents() Pin
Donald Blachly30-Oct-02 4:05
Donald Blachly30-Oct-02 4:05 
GeneralRe: InitiateComponents() Pin
Stephane Rodriguez.30-Oct-02 4:18
Stephane Rodriguez.30-Oct-02 4:18 
GeneralRe: InitiateComponents() Pin
James T. Johnson30-Oct-02 4:28
James T. Johnson30-Oct-02 4:28 
Donald Blachly wrote:
Is this happening because I put the code in the "InitiateComponents()" method?

Yes, never ever ever ever ever put code in the InitializeComponent() method. (There is a reason there is a comment saying "Required method for Designer support - do not modify the contents of this method with the code editor." Its because the forms designer places all of its initialization code in that method re-writing it when major/minor changes occur.)

IIRC, this is part of the reason Petzold didn't use the IDE for the book; the code generated by the designer isn't the prettiest.

Instead put your code after the InitializeComponent() call in the constructor or override the OnLoad method or attach a handler to the Load event.

James
Sig code stolen from David Wulff

GeneralRe: InitializeComponent() Pin
Donald Blachly30-Oct-02 13:32
Donald Blachly30-Oct-02 13:32 
GeneralRe: InitializeComponent() Pin
James T. Johnson30-Oct-02 13:36
James T. Johnson30-Oct-02 13:36 
GeneralRe: InitiateComponents() Pin
Senkwe Chanda31-Oct-02 1:54
Senkwe Chanda31-Oct-02 1:54 
General2 questions Pin
Anonymous29-Oct-02 19:12
Anonymous29-Oct-02 19:12 
GeneralRe: 2 questions Pin
David Stone29-Oct-02 19:58
sitebuilderDavid Stone29-Oct-02 19:58 
GeneralRe: 2 questions Pin
Nnamdi Onyeyiri29-Oct-02 20:51
Nnamdi Onyeyiri29-Oct-02 20:51 
GeneralRe: 2 questions Pin
David Stone30-Oct-02 16:28
sitebuilderDavid Stone30-Oct-02 16:28 
GeneralRe: 2 questions Pin
Nnamdi Onyeyiri31-Oct-02 5:14
Nnamdi Onyeyiri31-Oct-02 5:14 
GeneralRe: 2 questions Pin
Paul Riley29-Oct-02 23:13
Paul Riley29-Oct-02 23:13 
Questionhow to list all the PCs within a group using Active Directory?? Pin
Wang Kaiming29-Oct-02 19:02
Wang Kaiming29-Oct-02 19:02 
AnswerRe: how to list all the PCs within a group using Active Directory?? Pin
Mazdak30-Oct-02 0:07
Mazdak30-Oct-02 0:07 
AnswerRe: how to list all the PCs within a group using Active Directory?? Pin
David Stone30-Oct-02 13:44
sitebuilderDavid Stone30-Oct-02 13:44 
QuestionNew project problem? Pin
chen29-Oct-02 16:31
chen29-Oct-02 16:31 
AnswerRe: New project problem? Pin
Stephane Rodriguez.29-Oct-02 18:43
Stephane Rodriguez.29-Oct-02 18:43 
GeneralRe: New project problem? Pin
chen29-Oct-02 19:18
chen29-Oct-02 19:18 
GeneralRe: New project problem? Pin
Stephane Rodriguez.29-Oct-02 19:33
Stephane Rodriguez.29-Oct-02 19:33 
GeneralSoapsuds and "Invalid schema data" Pin
Anonymous29-Oct-02 12:40
Anonymous29-Oct-02 12:40 

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.