Wednesday, 15 September 2010

c# - Windows forms resets to default value -


I'm going to ask questions Maybe a stupid question might be I have tried a lot but I did not understand that my What is the form so please help me

Basically what I need to do is I need to resize my window size according to a given dimension

My code Goes below as

  InitializeComponent (); this. Controller = false; this. Text = ""; This.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; This.Icon = null; this. Size = new size (10, 10); // my size this Maximum size = new size (10, 10); // my size   

but when the form has been changed to load dimension (132,10)

please suggest

<< Class> "post-text" itemprop = "text">

Move resizing code to shown event handler:

  Private zero myForm_Shown ( Object sender, event events e) {this.Size = new size (10, 10); // my size this Maximum size = new size (10, 10); // my size}   

You can add this handler to the form designer under the property, and use the event list.

Read more:

PS: As another poster (N4 TKD) has suggested, autosys property to false .

No comments:

Post a Comment