Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I've got a method that is called from a forms Resize event handler. This method resizes the controls on a form based on the current resolution (using 800x600 as a basis). The resize code works great, but I don't like the way you can see the controls "grow" as the form is loading. Is there any way I can disable the painting of the form until all the controls have been resized? I tried using the Windows.Forms.SetStyle() method but it doesn't seem to make a difference.
  • *Experts*
Posted

You could use those:

Me.SuspendLayout()
'and
Me.ResumeLayout()

It will stop the layout from changing until you resume it, and when it is supsended then change the properties.

Posted
I've tried calling SuspendLayout() and ResumeLayout() for all controls on a form and the form itself with no luck. According to the documentation, these methods should do what I need but it doesn't seem to work.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...