0
How do I resize my form according to the size of the Picturebox component?
In this case, the images in the Boxes may have different sizes. So I would like my Form to fit the size of the Picturebox. For example, if the image increases in size, the Form should follow its size.
Here I change the size of the Picturebox, but the Form does not resize.
public ResolverCaptcha(Bitmap imagemCaptcha, string mensagem)
{
InitializeComponent();
lblMensagem.Text = mensagem;
pctCaptcha.Width = imagemCaptcha.Width;
pctCaptcha.Height = imagemCaptcha.Height;
pctCaptcha.Image = imagemCaptcha;
}
This is the Form:
Your problem is changing the size of the form or knowing how much you need to increase? Or both?
– Jéf Bueno
@jbueno Change the size of the Form! Is there any configuration in the Form properties to fit the size of the components or really have to change the size "in the hand"?
– Lucas Alcântara
@Lucasalcântara how is the image loaded? it’s all in the hand!!!
– novic