I will try it.
Thanks.
"Jorge" <anonymous@discussions.microsoft.com> wrote in message
news:8dd901c4966e$5de8e6d0$a301280a@phx.gbl...[color=blue]
> Hi Dick
> I use the following to resize the image when its too big
> to fit in the picturebox.
>
> Dim caminho As String
> Dim imagem As Image
> Dim vista_reduzida As Image
> Dim a As System.Drawing.Image.GetThumbnailImageAbort
> Dim b As System.IntPtr
>
> Try
> imagem = imagem.FromFile(caminho)
>
> Dim resolucao_V As Single = imagem.Width
> Dim resolucao_H As Single = imagem.Height
> If resolucao_H > 992 And resolucao_V > 712 Then
> vista_reduzida = imagem.GetThumbnailImage(992, 712,
> a, b)
> Me.PictureBox1.Image = vista_reduzida
> Else
> Me.PictureBox1.Image = Image.FromFile(caminho)
> End If
>
> Catch ex As Exception
> MessageBox.Show(ex.Message, "SIGDIN",
> MessageBoxButtons.OK, MessageBoxIcon.Error,
> MessageBoxDefaultButton.Button3)
> End Try
>
> Kind Regards
> Jorge[color=green]
> >-----Original Message-----
> >A scrollbar will come up in you form:
> >So the control itself is resized I assume (made bigger).
> >
> >I want the control to be the same size all the time and[/color]
> the image inside[color=green]
> >resized with no deformation if that's possible.
> >
> >"Cor Ligthert" <notfirstname@planet.nl> wrote in message
> >news:OCPTTyllEHA.3756@TK2MSFTNGP11.phx.gbl...[color=darkred]
> >> Dick,
> >>
> >> It does a scrollbar will come up in your form when[/color][/color]
> that is, depending on[color=green]
> >the[color=darkred]
> >> setting of course assuming you did not only look to[/color][/color]
> StrechImage.[color=green][color=darkred]
> >>
> >> Cor
> >>
> >> > Thanks for the answer, but that doesn't do the trick[/color][/color]
> with pictures that[color=green][color=darkred]
> >> are
> >> > larger than the control itself.
> >> > The only that works is sizemode 'StretchImage', but[/color][/color]
> then the image is[color=green][color=darkred]
> >> > deformed.
> >> >
> >> > "Cor Ligthert" <notfirstname@planet.nl> wrote in[/color][/color]
> message[color=green][color=darkred]
> >> > news:On7j7kllEHA.1244@TK2MSFTNGP15.phx.gbl...
> >> > > Dick,
> >> > >
> >> > > The picturebox has in my opinion although it[/color][/color]
> derives from control the[color=green][color=darkred]
> >> most
> >> > > special properties, one of them is
> >> > >
> >> > > sizemode
> >> > >
> >> >
> >>[/color]
> >
http://msdn.microsoft.com/library/default.asp?[/color]
> url=/library/en-
> us/cpref/html/frlrfsystemwindowsformspictureboxclasssizemo
> detopic.asp[color=green][color=darkred]
> >> > >
> >> > > I hope this helps?
> >> > >
> >> > > Cor
> >> > >
> >> > > >
> >> > > > In my application I have a picturebox that must[/color][/color]
> contain previews of[color=green][color=darkred]
> >> > > picture
> >> > > > files. The picturebox must always have the same[/color][/color]
> size. For small[color=green][color=darkred]
> >> images
> >> > > > that fit, everything is ok.
> >> > > >
> >> > > > How can I fit in larger pictures?
> >> > > > (Ideally would be that the picture is centered[/color][/color]
> and fit in the box)[color=green][color=darkred]
> >> > > >
> >> > > > Is this possible with the standard control?
> >> > > > (if not, are there other controls who can do it[/color][/color]
> out there?)[color=green][color=darkred]
> >> > > >
> >> > > > Tia
> >> > > >
> >> > > >
> >> > >
> >> > >
> >> >
> >> >
> >>
> >>[/color]
> >
> >
> >.
> >[/color][/color]